Skip to content

Commit

Permalink
update: add tehem configs for MuiToggleButton
Browse files Browse the repository at this point in the history
  • Loading branch information
k0stik committed Oct 12, 2023
1 parent 108c6e7 commit abbfab8
Showing 1 changed file with 51 additions and 48 deletions.
99 changes: 51 additions & 48 deletions src/theme/components/buttons.ts
Original file line number Diff line number Diff line change
@@ -1,63 +1,66 @@
import { Theme } from "@mui/material/styles";

const buttons = (theme: Theme) => {
return {
MuiButton: {
variants: [
{
props: { size: "large" },
style: {
fontSize: "15px",
},
const config = {
variants: [
{
props: { size: "large" },
style: {
fontSize: "15px",
},
{
props: { size: "medium" },
style: {
fontSize: "14px",
},
},
{
props: { size: "medium" },
style: {
fontSize: "14px",
},
{
props: { size: "small" },
style: {
fontSize: "13px",
},
},
{
props: { size: "small" },
style: {
fontSize: "13px",
},
{
props: { variant: "exablue-contained" },
style: {
backgroundColor: theme.palette.primary.dark,
color: "white",
boxShadow: theme.shadows[2],
},
{
props: { variant: "exablue-contained" },
style: {
backgroundColor: theme.palette.primary.dark,
color: "white",
boxShadow: theme.shadows[2],

"&:hover": {
backgroundColor: theme.palette.primary.dark,
boxShadow: theme.shadows[4],
},
"&.Mui-disabled": {
color: theme.palette.primary.contrastText,
opacity: 0.8,
},
"&:hover": {
backgroundColor: theme.palette.primary.dark,
boxShadow: theme.shadows[4],
},
"&.Mui-disabled": {
color: theme.palette.primary.contrastText,
opacity: 0.8,
},
},
{
props: { variant: "selected" },
style: {
backgroundColor: "rgba(16,86,190,0.1)",
color: theme.palette.primary.main,
boxShadow: theme.shadows[2],
padding: "8px 22px",
},
{
props: { variant: "selected" },
style: {
backgroundColor: "rgba(16,86,190,0.1)",
color: theme.palette.primary.main,
boxShadow: theme.shadows[2],
padding: "8px 22px",

"&:hover": {
backgroundColor: "rgba(16,86,190,0.2)",
},
"&.Mui-disabled": {
color: theme.palette.primary.main,
boxShadow: "none",
},
"&:hover": {
backgroundColor: "rgba(16,86,190,0.2)",
},
"&.Mui-disabled": {
color: theme.palette.primary.main,
boxShadow: "none",
},
},
],
},
},
],
};

return {
MuiButton: config,
MuiToggleButton: config,
};
};

Expand Down

0 comments on commit abbfab8

Please sign in to comment.