Changed value prop name to label for button label. Added sample buttons to home page
This commit is contained in:
1 parent
33f68ebbe3
commit
e333a8fdc8
3 files changed
+15
-5
No files matched your search
@@ -27,18 +27,18 @@ const levelConfig = {
|
||||
* @property {boolean} [disabled] - Whether the button is disabled
|
||||
*/
|
||||
|
||||
const Button = ({ level, value, disabled }) => {
|
||||
const Button = ({ level, label, disabled }) => {
|
||||
const { variant, color } = levelConfig[level];
|
||||
return (
|
||||
<MuiButton variant={variant} color={color} disabled={disabled}>
|
||||
{value}
|
||||
{label}
|
||||
</MuiButton>
|
||||
);
|
||||
};
|
||||
|
||||
Button.propTypes = {
|
||||
level: PropTypes.string.isRequired,
|
||||
value: PropTypes.string.isRequired,
|
||||
label: PropTypes.string.isRequired,
|
||||
disabled: PropTypes.bool,
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user