diff --git a/src/components/NextButton/NextButton.tsx b/src/components/NextButton/NextButton.tsx index 8956276144..4774eb9c23 100644 --- a/src/components/NextButton/NextButton.tsx +++ b/src/components/NextButton/NextButton.tsx @@ -6,25 +6,20 @@ import styled from 'styled-components' import Button from 'components/Button' -import configuration from '../../shared/services/configuration/configuration' - -const appMode = configuration.featureFlags.appMode - -const StyledButton = styled(Button)` - margin-right: ${appMode ? '0' : '15px !important'}; - width: ${appMode ? '100%' : 'auto'}; -` - interface Props { - className?: string + appMode?: boolean children: ReactNode onClick: (event: BaseSyntheticEvent) => void } -const NextButton = ({ className = '', children, onClick }: Props) => ( +const StyledButton = styled(Button)` + ${({ appMode }) => !appMode && 'margin-right: 15px !important'}; + ${({ appMode }) => appMode && 'width: 100%;'} +` + +const NextButton = ({ appMode, children, onClick, ...restProps }: Props) => ( { (!mapActive && (appMode ? ( { handleSubmit(e, next, wizardStep.formAction) }}