1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/frontend/src/themes/themeStyles.ts
olav 24c11332b5 chore: update MUI to v5 (#923)
* refactor: update mui packages

* refactor: run mui codemods

* refactor: format files after codemods

* refactor: fix broken types

* refactor: clean up theme

* refactor: fix broken tests

* refactor: replace @mui/styles with tss-react

* refactor: move breakpoints into classes for tss

* refactor: fix crash on missing feature description

* refactor: remove void classNames

* refactor: adjust styles to new defaults

* refactor: remove broken rollout slider e2e test

* refactor: fix duplicate e2e testid

* refactor: update makeStyles after rebase

* refactor: add missing snapshot after rebase

* refactor: fix TableCellSortable focus styles

* refactor: use 1.4 as the default line-height

* refactor: hide webkit search field icons

* refactor: fix select box label

* refactor: make AutocompleteBox smaller

* refactor: make heading smaller

* refactor: fix toast close icon color

* refactor: update snapshots

* refactor: add missing test event awaits

* refactor: fix default button line-height
2022-05-02 15:52:41 +02:00

145 lines
3.4 KiB
TypeScript

import { makeStyles } from 'tss-react/mui';
export const useThemeStyles = makeStyles()(theme => ({
focusable: {
'&:focus-visible': {
outline: 0,
outlineStyle: 'solid',
outlineWidth: 2,
outlineOffset: 2,
outlineColor: theme.palette.primary.main,
},
},
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',
},
},
relative: {
position: 'relative',
},
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)',
[theme.breakpoints.down('sm')]: {
right: 20,
left: 10,
top: 40,
},
},
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,
},
}));