-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
misc: refactor shared styled typography to render FC with TW (#1950)
- Loading branch information
Showing
14 changed files
with
69 additions
and
56 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
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
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
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
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,18 +1,26 @@ | ||
import { FC, PropsWithChildren } from 'react' | ||
import styled from 'styled-components' | ||
|
||
import { Typography } from '~/components/designSystem' | ||
import { NAV_HEIGHT, theme } from '~/styles' | ||
import { Typography, TypographyProps } from '~/components/designSystem' | ||
import { theme } from '~/styles' | ||
|
||
import { tw } from './utils' | ||
|
||
export const SideSection = styled.div<{ $empty?: boolean }>` | ||
> *:first-child { | ||
margin-bottom: ${({ $empty }) => ($empty ? theme.spacing(6) : 0)}; | ||
} | ||
` | ||
|
||
export const SectionHeader = styled(Typography)<{ $hideBottomShadow?: boolean }>` | ||
height: ${NAV_HEIGHT}px; | ||
box-shadow: ${({ $hideBottomShadow }) => ($hideBottomShadow ? undefined : theme.shadows[7])}; | ||
display: flex; | ||
align-items: center; | ||
justify-content: space-between; | ||
` | ||
export const SectionHeader: FC< | ||
PropsWithChildren<{ hideBottomShadow?: boolean } & TypographyProps> | ||
> = ({ children, hideBottomShadow, ...props }) => ( | ||
<Typography | ||
className={tw('flex h-18 items-center justify-between', { | ||
'shadow-b': !hideBottomShadow, | ||
})} | ||
{...props} | ||
> | ||
{children} | ||
</Typography> | ||
) |
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