Skip to content

Commit

Permalink
Fix conditional styling, remove unnecessary style rule
Browse files Browse the repository at this point in the history
  • Loading branch information
alimpens committed Nov 25, 2024
1 parent 7698437 commit 33d80e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/NextButton/NextButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@ import styled from 'styled-components'

import Button from 'components/Button'

const StyledButton = styled(Button)<{ $appMode?: boolean }>`
${({ $appMode }) => !$appMode && 'margin-right: 15px !important'};
`

interface Props {
appMode?: boolean
children: ReactNode
onClick: (event: BaseSyntheticEvent) => void
}

const StyledButton = styled(Button)<Props>`
${({ appMode }) => !appMode && 'margin-right: 15px !important'};
${({ appMode }) => appMode && 'width: 100%;'}
`

const NextButton = ({ appMode, children, onClick, ...restProps }: Props) => (
<StyledButton
{...restProps}
$appMode={appMode}
onClick={onClick}
taskflow={!appMode}
type="submit"
Expand Down

0 comments on commit 33d80e1

Please sign in to comment.