mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
2c1353d0ea
* fix: add initial interface * feat: create separate components * feat: implement constraints for existing strategies * feat: add searchfield * fix: reset values on context change * fix: key issue with duplicate values * fix: increase auto hide duration of errors * fix: types * feat: resolve inputs * fix: add date input * fix: add filter * fix: create strategy * fix: remove unused deps * feat: validation * fix: type setError * feat: handle currentTime based on client spec * fix: date field * feat: api validation * fix: refactor * fix: refactor * feat: add compact * fix: remove unused code * feat: mobile optimisations * fix: remove coalescing operator for constraint * fix: clone deep * fix: move parseDate * fix: lift state up for value setting on dates * fix: rename values * fix: change type to interface * fix: lazy initialise values * fix: create operator type * fix: update naming * fix: naming * fix: aria hidden * fix: remove optional operator * fix: rename new constraints * fix: setup flag * fix: refactor date check to date-fns * fix: use date-fns for validation * fix: detach validators from state * refactor: move resolve input to it's own component * fix: remove unused imports * fix: change values container to overflow auto * fix: update placeholder * fix: update import * fix: backwards compatability * fix: hide paragraphs if not active * fix: update path * fix: update strategy text
128 lines
3.0 KiB
JavaScript
128 lines
3.0 KiB
JavaScript
import { makeStyles } from '@material-ui/styles';
|
|
|
|
export const useCommonStyles = makeStyles(theme => ({
|
|
contentSpacingY: {
|
|
'& > *': {
|
|
marginTop: '0.5rem !important',
|
|
marginBottom: '0.5rem !important',
|
|
},
|
|
},
|
|
contentSpacingYLarge: {
|
|
'& > *': {
|
|
marginTop: '1.5rem !important',
|
|
marginBottom: '1.5rem !important',
|
|
},
|
|
},
|
|
contentSpacingX: {
|
|
'& > *': {
|
|
marginRight: '0.8rem !important',
|
|
marginLeft: '0.8rem !important',
|
|
},
|
|
},
|
|
divider: {
|
|
margin: '1rem 0',
|
|
backgroundColor: theme.palette.division.main,
|
|
height: '3px',
|
|
width: '100%',
|
|
},
|
|
largeDivider: {
|
|
margin: '2rem 0',
|
|
backgroundColor: theme.palette.division.main,
|
|
height: '3px',
|
|
width: '100%',
|
|
},
|
|
bold: {
|
|
fontWeight: 'bold',
|
|
},
|
|
flexRow: {
|
|
display: 'flex',
|
|
alignItems: 'center',
|
|
},
|
|
flexColumn: {
|
|
display: 'flex',
|
|
flexDirection: 'column',
|
|
},
|
|
itemsCenter: {
|
|
alignItems: 'center',
|
|
},
|
|
justifyCenter: {
|
|
justifyContent: 'center',
|
|
},
|
|
flexWrap: {
|
|
flexWrap: 'wrap',
|
|
},
|
|
textCenter: {
|
|
textAlign: 'center',
|
|
},
|
|
fullWidth: {
|
|
width: '100%',
|
|
},
|
|
fullHeight: {
|
|
height: '100%',
|
|
},
|
|
title: {
|
|
fontSize: theme.fontSizes.mainHeader,
|
|
fontWeight: 'bold',
|
|
marginBottom: '0.5rem',
|
|
},
|
|
fadeInBottomStartNoPosition: {
|
|
transform: 'translateY(400px)',
|
|
opacity: '0',
|
|
boxShadow: `rgb(129 129 129 / 40%) 4px 5px 11px 4px`,
|
|
zIndex: 500,
|
|
width: '100%',
|
|
backgroundColor: '#fff',
|
|
right: 0,
|
|
bottom: 0,
|
|
left: 0,
|
|
height: '300px',
|
|
position: 'fixed',
|
|
},
|
|
fadeInBottomStart: {
|
|
opacity: '0',
|
|
position: 'fixed',
|
|
right: '40px',
|
|
bottom: '40px',
|
|
transform: 'translateY(400px)',
|
|
},
|
|
fadeInBottomStartWithoutFixed: {
|
|
opacity: '0',
|
|
right: '40px',
|
|
bottom: '40px',
|
|
transform: 'translateY(400px)',
|
|
zIndex: 1400,
|
|
position: 'fixed',
|
|
},
|
|
fadeInBottomEnter: {
|
|
transform: 'translateY(0)',
|
|
opacity: '1',
|
|
transition: 'transform 0.6s ease, opacity 1s ease',
|
|
},
|
|
fadeInBottomLeave: {
|
|
transform: 'translateY(400px)',
|
|
opacity: '0',
|
|
transition: 'transform 1.25s ease, opacity 1s ease',
|
|
},
|
|
fadeInTopStart: {
|
|
opacity: '0',
|
|
position: 'fixed',
|
|
right: '40px',
|
|
top: '40px',
|
|
transform: 'translateY(-400px)',
|
|
},
|
|
fadeInTopEnter: {
|
|
transform: 'translateY(100px)',
|
|
opacity: '1',
|
|
transition: 'transform 0.6s ease, opacity 1s ease',
|
|
},
|
|
fadeInTopLeave: {
|
|
transform: 'translateY(-400px)',
|
|
opacity: '0',
|
|
transition: 'transform 1.25s ease, opacity 1s ease',
|
|
},
|
|
error: {
|
|
fontSize: theme.fontSizes.smallBody,
|
|
color: theme.palette.error.main,
|
|
},
|
|
}));
|