Styles on Stepper's Controls component

This commit is contained in:
apanizo 2018-09-24 16:24:53 +02:00
parent 0fc735187e
commit def45c383c
1 changed files with 6 additions and 4 deletions

View File

@ -9,7 +9,6 @@ type ControlProps = {
next: string, next: string,
back: string, back: string,
onPrevious: () => void, onPrevious: () => void,
firstPage: boolean,
disabled: boolean, disabled: boolean,
} }
@ -18,14 +17,18 @@ const controlStyle = {
padding: sm, padding: sm,
} }
const firstButtonStyle = {
marginRight: sm,
}
const ControlButtons = ({ const ControlButtons = ({
next, back, firstPage, onPrevious, disabled, next, back, onPrevious, disabled,
}: ControlProps) => ( }: ControlProps) => (
<Row style={controlStyle} align="end" grow> <Row style={controlStyle} align="end" grow>
<Col xs={12} end="xs"> <Col xs={12} end="xs">
<Button <Button
style={firstButtonStyle}
type="button" type="button"
disabled={firstPage || disabled}
onClick={onPrevious} onClick={onPrevious}
size="small" size="small"
> >
@ -63,7 +66,6 @@ const Controls = ({
back={firstPage ? 'Cancel' : 'Back'} back={firstPage ? 'Cancel' : 'Back'}
// eslint-disable-next-line // eslint-disable-next-line
next={firstPage ? 'Start' : lastPage ? 'Finish' : 'Next'} next={firstPage ? 'Start' : lastPage ? 'Finish' : 'Next'}
firstPage={firstPage}
onPrevious={onPrevious} onPrevious={onPrevious}
/> />
) )