-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: DocumentCard mobile, various fixes (#109)
* fix(redmine 1273834): mobile fix for DocumentCard, various fixes * fix: fixed DocumentList style
- Loading branch information
1 parent
96b5137
commit d83a887
Showing
22 changed files
with
584 additions
and
174 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,6 @@ | ||
--- | ||
'@smile/react-front-kit': minor | ||
'storybook-pages': minor | ||
--- | ||
|
||
Added mobile style for DocumentCard and DocumentList, various fixes on DocumentCard, SelectableList and DocumentList, updated example of DocumentList in SearchResults page, added '\*.png' module to global.d.ts |
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
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
104 changes: 83 additions & 21 deletions
104
packages/react-front-kit/src/Components/DocumentCard/DocumentCard.style.tsx
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,76 +1,138 @@ | ||
import { createStyles } from '@mantine/styles'; | ||
import { createStyles, getStylesRef } from '@mantine/styles'; | ||
|
||
export const useStyles = createStyles((theme) => ({ | ||
author: { | ||
fontWeight: 600, | ||
}, | ||
children: { | ||
[theme.fn.smallerThan('sm')]: { | ||
marginTop: '10px', | ||
}, | ||
marginTop: '16px', | ||
}, | ||
clickable: { | ||
cursor: 'pointer', | ||
}, | ||
header: { | ||
display: 'flex', | ||
flexWrap: 'wrap', | ||
}, | ||
headerBottom: { | ||
'@media (max-width: 833px)': { | ||
flexDirection: 'column', | ||
[theme.fn.smallerThan('sm')]: { | ||
fontSize: '12px', | ||
margin: 0, | ||
}, | ||
[theme.fn.largerThan('sm')]: { | ||
alignItems: 'center', | ||
}, | ||
color: theme.colors.dark[3], | ||
display: 'flex', | ||
flexWrap: 'wrap', | ||
fontSize: '14px', | ||
fontWeight: 400, | ||
marginRight: '12px', | ||
}, | ||
headerContent: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
[theme.fn.smallerThan('sm')]: { | ||
gap: '16px', | ||
}, | ||
[theme.fn.largerThan('sm')]: { | ||
gap: '4px', | ||
}, | ||
}, | ||
headerTop: { | ||
'@media (max-width: 833px)': { | ||
[theme.fn.smallerThan('sm')]: { | ||
flexDirection: 'column', | ||
marginLeft: '40px', | ||
}, | ||
[theme.fn.largerThan('sm')]: { | ||
alignItems: 'center', | ||
}, | ||
display: 'flex', | ||
flexWrap: 'wrap', | ||
ref: getStylesRef('documentCardHeaderTop'), | ||
}, | ||
icon: { | ||
color: theme.fn.primaryColor(), | ||
[theme.fn.smallerThan('sm')]: { | ||
height: '24px', | ||
width: '24px', | ||
}, | ||
[theme.fn.largerThan('sm')]: { | ||
height: '38px', | ||
width: '38px', | ||
}, | ||
}, | ||
iconContainer: { | ||
[theme.fn.smallerThan('sm')]: { | ||
height: '24px', | ||
margin: '8.5px 16px 8.5px 0', | ||
position: 'absolute', | ||
}, | ||
marginRight: '16px', | ||
ref: getStylesRef('documentCardIcon'), | ||
}, | ||
image: { | ||
border: `1px solid ${theme.colors.gray[2]}`, | ||
borderRadius: '16px', | ||
marginRight: '32px', | ||
minHeight: '164px', | ||
[theme.fn.largerThan('sm')]: { | ||
marginRight: '32px', | ||
minHeight: '164px', | ||
}, | ||
}, | ||
imageRoot: { | ||
'@media (max-width: 414px)': { | ||
maxWidth: '100%', | ||
[theme.fn.smallerThan('sm')]: { | ||
display: 'none', | ||
marginTop: '16px', | ||
order: 2, | ||
}, | ||
'@media (max-width: 833px)': { | ||
flexDirection: 'column', | ||
marginBottom: '20px', | ||
[theme.fn.largerThan('sm')]: { | ||
marginRight: '32px', | ||
maxWidth: '165px', | ||
}, | ||
}, | ||
imageRootMobileDisplayed: { | ||
[theme.fn.smallerThan('sm')]: { | ||
display: 'initial', | ||
}, | ||
}, | ||
mobileImageButton: { | ||
background: 'transparent', | ||
border: 0, | ||
marginTop: '10px', | ||
[theme.fn.largerThan('sm')]: { | ||
display: 'none', | ||
}, | ||
marginRight: '32px', | ||
maxWidth: '165px', | ||
}, | ||
path: { | ||
[theme.fn.smallerThan('sm')]: { | ||
fontSize: '12px', | ||
}, | ||
color: theme.colors.dark[6], | ||
fontWeight: 400, | ||
}, | ||
root: { | ||
cursor: 'pointer', | ||
display: 'flex', | ||
// eslint-disable-next-line sort-keys | ||
'@media (max-width: 833px)': { | ||
ref: getStylesRef('documentCard'), | ||
[theme.fn.smallerThan('sm')]: { | ||
flexDirection: 'column', | ||
}, | ||
}, | ||
separator: { | ||
'@media (max-width: 833px)': { | ||
display: 'none', | ||
[theme.fn.smallerThan('sm')]: { | ||
// display: 'none', | ||
margin: '0 7px', | ||
}, | ||
margin: '0 12px', | ||
}, | ||
title: { | ||
[theme.fn.smallerThan('sm')]: { | ||
fontSize: '14px', | ||
margin: 0, | ||
}, | ||
display: 'flex', | ||
fontSize: '18px', | ||
fontWeight: 'bold', | ||
fontWeight: 700, | ||
margin: '0 16px 0 0', | ||
}, | ||
})); |
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
Oops, something went wrong.