Skip to content

Commit

Permalink
Update the buttons on Irregularity page (#1875)
Browse files Browse the repository at this point in the history
Co-authored-by: ani-kalpachka <[email protected]>
  • Loading branch information
ani-kalpachka and ani-kalpachka authored Jul 9, 2024
1 parent e39bab4 commit 6cb0d41
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 6cb0d41

Please sign in to comment.