1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-14 00:19:16 +01:00

fix: toast in mobile view (#831)

* fix: toast in mobile view

* fix: feature settings mobile view

* fix: feedback in mobile

* fix: add space for ts expect error

* fix: change breakpoint to xs instead of sm
This commit is contained in:
Youssef Khedher 2022-03-31 11:14:13 +01:00 committed by GitHub
parent 70e4f4608a
commit 8081e20b96
6 changed files with 18 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import { makeStyles } from '@material-ui/styles'; import { makeStyles } from '@material-ui/core/styles';
export const useCommonStyles = makeStyles(theme => ({ export const useCommonStyles = makeStyles(theme => ({
contentSpacingY: { contentSpacingY: {
@ -24,12 +24,14 @@ export const useCommonStyles = makeStyles(theme => ({
}, },
divider: { divider: {
margin: '1rem 0', margin: '1rem 0',
// @ts-expect-error
backgroundColor: theme.palette.division.main, backgroundColor: theme.palette.division.main,
height: '3px', height: '3px',
width: '100%', width: '100%',
}, },
largeDivider: { largeDivider: {
margin: '2rem 0', margin: '2rem 0',
// @ts-expect-error
backgroundColor: theme.palette.division.main, backgroundColor: theme.palette.division.main,
height: '3px', height: '3px',
width: '100%', width: '100%',
@ -112,6 +114,11 @@ export const useCommonStyles = makeStyles(theme => ({
right: '40px', right: '40px',
top: '40px', top: '40px',
transform: 'translateY(-400px)', transform: 'translateY(-400px)',
[theme.breakpoints.down('xs')]: {
right: 20,
left: 10,
top: 40,
},
}, },
fadeInTopEnter: { fadeInTopEnter: {
transform: 'translateY(100px)', transform: 'translateY(100px)',

View File

@ -9,6 +9,10 @@ export const useStyles = makeStyles(theme => ({
display: 'flex', display: 'flex',
justifyContent: 'center', justifyContent: 'center',
alignItems: 'center', alignItems: 'center',
[theme.breakpoints.down('xs')]: {
width: '50px',
height: '50px',
},
}, },
check: { check: {
color: '#fff', color: '#fff',

View File

@ -2,11 +2,11 @@ import { makeStyles } from '@material-ui/core/styles';
export const useStyles = makeStyles(theme => ({ export const useStyles = makeStyles(theme => ({
container: { container: {
width: '450px', maxWidth: '450px',
background: '#fff', background: '#fff',
boxShadow: '2px 2px 4px rgba(0,0,0,0.4)', boxShadow: '2px 2px 4px rgba(0,0,0,0.4)',
zIndex: 500, zIndex: 500,
margin: '0 auto', margin: '0 0.8rem',
borderRadius: '12.5px', borderRadius: '12.5px',
padding: '2rem', padding: '2rem',
}, },

View File

@ -140,7 +140,7 @@ const FeatureForm: React.FC<IFeatureToggleForm> = ({
data-test={CF_DESC_ID} data-test={CF_DESC_ID}
onChange={e => setDescription(e.target.value)} onChange={e => setDescription(e.target.value)}
/> />
<FormControl> <FormControl className={styles.input}>
<Typography <Typography
variant="subtitle1" variant="subtitle1"
className={styles.roleSubtitle} className={styles.roleSubtitle}

View File

@ -11,6 +11,9 @@ export const useStyles = makeStyles(theme => ({
width: '20%', width: '20%',
borderRight: `1px solid ${theme.palette.grey[300]}`, borderRight: `1px solid ${theme.palette.grey[300]}`,
padding: '1rem 0', padding: '1rem 0',
[theme.breakpoints.down('sm')]: {
width: '35%',
},
}, },
listItem: { listItem: {
padding: '0.75rem 2rem', padding: '0.75rem 2rem',

View File

@ -8,8 +8,6 @@ export const useStyles = makeStyles(theme => ({
boxShadow: '2px 2px 4px 4px rgba(143,143,143, 0.25)', boxShadow: '2px 2px 4px 4px rgba(143,143,143, 0.25)',
padding: '1.5rem', padding: '1.5rem',
maxWidth: '400px', maxWidth: '400px',
width: '400px',
height: '200px',
}, },
animateContainer: { animateContainer: {
zIndex: 9999, zIndex: 9999,