Skip to content

Commit

Permalink
Remove dark-secondary
Browse files Browse the repository at this point in the history
  • Loading branch information
anagperal committed Jun 28, 2024
1 parent 13af8a5 commit c9e0fb8
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/webapp/components/button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import React from "react";
import { Button as MUIButton } from "@material-ui/core";
import styled from "styled-components";

type ButtonProps = {
children?: React.ReactNode;
variant?: "contained" | "outlined";
color?: "primary" | "secondary" | "dark-secondary";
color?: "primary" | "secondary";
disabled?: boolean;
startIcon?: React.ReactNode;
onClick: () => void;
Expand All @@ -21,22 +20,16 @@ export const Button: React.FC<ButtonProps> = React.memo(
onClick,
}) => {
return (
<StyledButton
<MUIButton
variant={variant}
color={color === "dark-secondary" ? "secondary" : color}
color={color}
disabled={disabled}
startIcon={startIcon}
disableElevation
$darkBorder={color === "dark-secondary"}
onClick={onClick}
>
{children}
</StyledButton>
</MUIButton>
);
}
);

const StyledButton = styled(MUIButton)<{ $darkBorder: boolean }>`
border-color: ${props =>
props.$darkBorder ? props.theme.palette.button.borderDarkSecondary : "initial"};
`;

0 comments on commit c9e0fb8

Please sign in to comment.