Changed value prop name to label for button label. Added sample buttons to home page

This commit is contained in:
Alex Holliday committed 2024-05-06 12:34:36 -07:00
1 parent 33f68ebbe3
commit e333a8fdc8
3 files changed
+15 -5

No files matched your search

+3 -3
View File
@@ -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,
};
+11 -1
View File
@@ -8,13 +8,23 @@ const Home = () => {
<>
<div>Home</div>
<DropdownTeamMember />
<div style={{ display: "flex", flexDirection: "flex-column" }}>
<div
style={{ display: "flex", flexDirection: "column", marginTop: "2rem" }}
>
<h4>Buttons</h4>
<div>
<Button level="primary" label="Primary" />
<Button level="secondary" label="Secondary" />
<Button level="tertiary" label="Tertiary" />
<Button level="error" label="Error" />
</div>
<h4>Disabled Buttons</h4>
<div>
<Button level="primary" label="Primary" disabled />
<Button level="secondary" label="Secondary" disabled />
<Button level="tertiary" label="Tertiary" disabled />
<Button level="error" label="Error" disabled />
</div>
</div>
</>
);
+1 -1
View File
@@ -70,4 +70,4 @@ button:focus-visible {
button {
background-color: #f9f9f9;
}
}
}