-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FX-5687] Migrate PageFooter to TailwindCSS
- Loading branch information
1 parent
b42a5dd
commit 7d6d366
Showing
3 changed files
with
30 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@toptal/picasso-page': patch | ||
--- | ||
|
||
- migrate `PageFooter` to TailwindCSS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,13 @@ | ||
import type { Theme } from '@material-ui/core/styles' | ||
import { createStyles } from '@material-ui/core/styles' | ||
import type { PageContextProps } from '../Page/types' | ||
|
||
export default ({ palette, screens, layout }: Theme) => | ||
createStyles({ | ||
root: { | ||
backgroundColor: palette.grey.darker, | ||
width: '100%', | ||
}, | ||
content: { | ||
boxSizing: 'border-box', | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
margin: '0 auto', | ||
paddingTop: '0.5rem', | ||
paddingBottom: '1.5rem', | ||
paddingLeft: layout.contentMobilePaddingHorizontal, | ||
paddingRight: layout.contentMobilePaddingHorizontal, | ||
maxWidth: layout.contentWidth, | ||
color: palette.common.white, | ||
fontSize: '0.875rem', | ||
lineHeight: '1em', | ||
export const getMaxWidthClass = ({ fullWidth, width }: PageContextProps) => { | ||
if (fullWidth || width === 'full') { | ||
return 'max-w-full' | ||
} | ||
|
||
[screens('xs', 'sm', 'md')]: { | ||
flexDirection: 'column', | ||
}, | ||
if (width === 'wide') { | ||
return 'max-w-[90em]' | ||
} | ||
|
||
[screens('md', 'lg', 'xl')]: { | ||
paddingLeft: layout.contentPaddingHorizontal, | ||
paddingRight: layout.contentPaddingHorizontal, | ||
}, | ||
}, | ||
centered: {}, | ||
wide: { | ||
maxWidth: layout.contentWidthWide, | ||
}, | ||
fullWidth: { | ||
maxWidth: '100%', | ||
}, | ||
left: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
marginTop: '1rem', | ||
}, | ||
right: { | ||
display: 'flex', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
marginTop: '1rem', | ||
|
||
[screens('xs', 'sm', 'md')]: { | ||
order: -1, | ||
}, | ||
|
||
[screens('xs', 'sm')]: { | ||
flexDirection: 'column', | ||
}, | ||
}, | ||
}) | ||
return 'max-w-[75em]' | ||
} |