Skip to content

Commit

Permalink
Update the buttons on Irregularity page
Browse files Browse the repository at this point in the history
  • Loading branch information
ani-kalpachka committed Jul 4, 2024
1 parent 6b5d3e8 commit 30a2989
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 44 deletions.
13 changes: 4 additions & 9 deletions src/components/client/irregularity/Actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ import { Grid } from '@mui/material'
import ArrowBackIosIcon from '@mui/icons-material/ArrowBackIos'
import ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos'

import {
ActionButton,
ActionLinkButton,
ActionSubmitButton,
Root,
} from './helpers/Irregularity.styled'
import { ActionButton, ActionLinkButton, ActionSubmitButton } from './helpers/Irregularity.styled'

type ActionsProps = {
nextLabel: string
Expand All @@ -37,12 +32,12 @@ export default function Actions({
const { t } = useTranslation('irregularity')

return (
<Root container item xs={12} spacing={3} justifyContent="space-between">
<Grid container item xs={12} spacing={3} justifyContent="space-between">
<Grid item sx={{ textAlign: 'left' }}>
{activeStep === 0 ? (
<ActionLinkButton
href={`/campaigns/${campaign.slug}`}
variant="outlined"
variant="text"
startIcon={<ArrowBackIosIcon fontSize="small" />}>
{t(backLabel)}
</ActionLinkButton>
Expand All @@ -64,6 +59,6 @@ export default function Actions({
endIcon={<ArrowForwardIosIcon fontSize="small" />}
/>
</Grid>
</Root>
</Grid>
)
}
39 changes: 4 additions & 35 deletions src/components/client/irregularity/helpers/Irregularity.styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,30 @@ export const ButtonsWrapper = styled(Grid)(() => ({
}))

export const ActionLinkButton = styled(LinkButton)(() => ({
backgroundColor: '#0098E3',
border: `1px solid ${theme.palette.secondary.light}`,
padding: theme.spacing(1, 5),
borderRadius: theme.borders.round,
color: theme.palette.common.white,
fontSize: theme.typography.pxToRem(18),
fontSize: theme.typography.pxToRem(14),

'&:hover': {
backgroundColor: '#62C4FB',
color: theme.palette.common.black,
border: `1px solid ${theme.palette.secondary.light}`,
},

[theme.breakpoints.down('md')]: {
fontSize: theme.typography.pxToRem(11),
marginBottom: theme.spacing(4),
backgroundColor: 'transparent',
},
}))

export const ActionButton = styled(Button)(() => ({
backgroundColor: '#0098E3',
border: `1px solid ${theme.palette.secondary.light}`,
padding: theme.spacing(1, 5),
borderRadius: theme.borders.round,
color: theme.palette.common.white,
fontSize: theme.typography.pxToRem(18),
fontSize: theme.typography.pxToRem(14),

'&:hover': {
backgroundColor: '#62C4FB',
color: theme.palette.common.black,
border: `1px solid ${theme.palette.secondary.light}`,
},

[theme.breakpoints.down('md')]: {
fontSize: theme.typography.pxToRem(11),
marginBottom: theme.spacing(4),
},
}))

export const ActionSubmitButton = styled(SubmitButton)(() => ({
backgroundColor: '#0098E3',
border: `1px solid ${theme.palette.secondary.light}`,
padding: theme.spacing(1, 5),
borderRadius: theme.borders.round,
color: theme.palette.common.white,
fontSize: theme.typography.pxToRem(18),
fontSize: theme.typography.pxToRem(14),

'&:hover': {
backgroundColor: '#62C4FB',
color: theme.palette.common.black,
border: `1px solid ${theme.palette.secondary.light}`,
},

[theme.breakpoints.down('md')]: {
fontSize: theme.typography.pxToRem(11),
marginBottom: theme.spacing(4),
},
}))

0 comments on commit 30a2989

Please sign in to comment.