Skip to content

Commit

Permalink
fix: move typography color fix to proper file
Browse files Browse the repository at this point in the history
  • Loading branch information
quantizor authored and gregberge committed Oct 7, 2021
1 parent 1498d86 commit 5c635b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/system/src/styles/colors.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import * as CSS from 'csstype'
import { themeGetter } from '../style'
import { SystemProp, ThemeNamespaceValue, ITheme, Theme } from '../types'
import { ThemeNamespaceValue, ITheme, Theme } from '../types'

export type ThemeColor<T extends ITheme = Theme> = ThemeNamespaceValue<
'colors',
T
>
export type Color<T extends ITheme = Theme> = SystemProp<ThemeColor<T> | CSS.Property.Color, T>;
export type Color<T extends ITheme = Theme> = ThemeColor<T> | CSS.Property.Color
export const getColor = themeGetter<ThemeColor>({
name: 'color',
key: 'colors',
Expand Down
7 changes: 5 additions & 2 deletions packages/system/src/styles/typography.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const letterSpacing = style<LetterSpacingProps>({
// Color

export interface ColorProps<T extends ITheme = Theme> {
color?: Color<T>
color?: SystemProp<Color<T>, T>
}
export const color = style<ColorProps>({
prop: 'color',
Expand Down Expand Up @@ -231,7 +231,10 @@ export interface TextProps<T extends ITheme = Theme> {
export const text = style<TextProps>({
prop: 'text',
key: 'texts',
css: (value) => ({ theme }: any) => all({ ...value, theme }),
css:
(value) =>
({ theme }: any) =>
all({ ...value, theme }),
})

// @TODO add word-break
Expand Down

0 comments on commit 5c635b0

Please sign in to comment.