Skip to content

Commit

Permalink
Merge branch '15-feature/common-components' into 20-design/home-page
Browse files Browse the repository at this point in the history
  • Loading branch information
shlee9999 committed Nov 21, 2024
2 parents 75e4836 + b507f59 commit 52b5730
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/components/Typo/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import { FontWeight, GrayscaleColors, styled } from 'styled-components'
import { BrandColors, FontWeight, GrayscaleColors, styled } from 'styled-components'

type TypoProps = {
color?: keyof GrayscaleColors
color?: keyof GrayscaleColors | keyof BrandColors
weight?: FontWeight
}

const Typo = styled.p<TypoProps>`
color: ${({ color }) => (color ? color : 'inherit')};
color: ${({ theme, color }) =>
theme.colors.grayscale[color as keyof GrayscaleColors] ||
theme.colors.brand[color as keyof BrandColors] ||
'inherit'};
font-weight: ${({ weight }) => (weight ? weight : 400)};
`

Expand Down

0 comments on commit 52b5730

Please sign in to comment.