Skip to content

Commit

Permalink
fix: button design on mobile (dfinity#308)
Browse files Browse the repository at this point in the history
* Fix continue button style on small screens

* Added newline
  • Loading branch information
Marco Segreto authored Mar 22, 2021
1 parent 08ff6d3 commit dcd553d
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions apps/identity-provider/src/components/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import MatButton, { ButtonProps } from '@material-ui/core/Button';
import { styled } from '@material-ui/core/styles';
import { withStyles, createStyles, Theme } from '@material-ui/core/styles';
import React from 'react';

const SpacedMatButton = styled(MatButton)(({ theme }) => ({
marginLeft: theme.spacing(1),
marginRight: theme.spacing(1),
}));
const styles = ({ breakpoints, spacing }: Theme) => createStyles({
root: {
marginLeft: spacing(1),
marginRight: spacing(1),
maxWidth: `calc(100% - ${spacing(1)}px)`,
whiteSpace: 'nowrap'
},
[breakpoints.down('xs')]: {
label: {
display: 'block'
}
}
});

const SpacedMatButton = withStyles(styles)((props: ButtonProps) =>
<MatButton {...props} classes={props.classes} />
);

export const Button = Object.assign(
(
Expand Down

0 comments on commit dcd553d

Please sign in to comment.