Skip to content

Commit

Permalink
feat: Styles for option buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s committed Nov 28, 2023
1 parent e31971d commit 18ff5f2
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions editor.planx.uk/src/ui/OptionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,29 @@ const Root = styled(ButtonBase, {
!["selected", "backgroundColor"].includes(prop.toString()),
})<Props>(({ theme, selected, backgroundColor }) => ({
height: 50,
paddingLeft: 50,
paddingRight: theme.spacing(3),
padding: theme.spacing(0, 3, 0, 5),
marginBottom: theme.spacing(0.5),
fontSize: 15,
position: "relative",
fontFamily: "inherit",
display: "block",
width: "auto",
minWidth: 200,
textAlign: "left",
border: `1px solid ${theme.palette.border.light}`,
backgroundColor: theme.palette.common.white,
"&::before": {
content: "''",
position: "absolute",
height: 10,
width: 10,
left: 20,
top: 20,
height: 12,
width: 12,
left: 18,
top: 18,
borderRadius: "50%",
backgroundColor: theme.palette.grey[500],
backgroundColor: theme.palette.grey[400],
...(selected && {
color: "#fff",
backgroundColor: backgroundColor || theme.palette.success.light,
backgroundColor: backgroundColor || theme.palette.success.main,
}),
},
...(!selected && {
Expand All @@ -41,7 +43,7 @@ const Root = styled(ButtonBase, {
},
}),
...(selected && {
backgroundColor: theme.palette.grey[300],
backgroundColor: theme.palette.grey[200],
}),
}));

Expand Down

0 comments on commit 18ff5f2

Please sign in to comment.