front-hub/src/components/Button.tsx

20 lines
493 B
TypeScript
Raw Normal View History

2022-11-17 20:56:17 +00:00
import { Button as DefaultButton, styled } from "@mui/material";
import { ButtonProps } from "@mui/material/Button";
2022-11-19 20:30:28 +00:00
import { CSSProperties } from "react";
2022-11-17 12:25:23 +00:00
interface Props {
2022-11-19 20:30:28 +00:00
sx?: CSSProperties;
py?: string;
2022-11-17 12:25:23 +00:00
}
2022-11-17 20:56:17 +00:00
export default styled(DefaultButton)<ButtonProps & Props>(props => ({
paddingLeft: "41.5px",
paddingRight: "41.5px",
2022-11-19 20:30:28 +00:00
paddingTop: props.py || "10px",
paddingBottom: props.py || "10px",
2022-11-17 20:56:17 +00:00
borderRadius: "8px",
boxShadow: "none",
2022-11-19 20:30:28 +00:00
...props.style
2022-11-17 20:56:17 +00:00
}));