Skip to content

Commit

Permalink
fix: other props is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
mleralec committed Jul 6, 2022
1 parent 006dfb4 commit 362f237
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/config/index.ts
Expand Up @@ -4,6 +4,7 @@ export * from './color'
export * from './flex'
export * from './grid'
export * from './layout'
export * from './other'
export * from './position'
export * from './space'
export * from './typography'
2 changes: 1 addition & 1 deletion src/config/other.ts
Expand Up @@ -12,7 +12,7 @@ export type OtherProps = Props<{
visibility: CSS.Property.Visibility
}>

export const layout = (props: OtherProps & ThemeProp): CSSObject => {
export const other = (props: OtherProps & ThemeProp): CSSObject => {
return {
cursor: props.cursor,
float: props.float,
Expand Down
6 changes: 5 additions & 1 deletion src/system.ts
Expand Up @@ -7,6 +7,7 @@ import {
flex,
grid,
layout,
other,
position,
space,
typography,
Expand All @@ -18,6 +19,7 @@ import type {
FlexProps,
GridProps,
LayoutProps,
OtherProps,
PositionProps,
SpaceProps,
TypographyProps,
Expand All @@ -32,7 +34,8 @@ export type SystemProps = BackgroundProps &
LayoutProps &
PositionProps &
SpaceProps &
TypographyProps
TypographyProps &
OtherProps

export const system = (props: SystemProps & ThemeProp): CSSObject => ({
...background(props),
Expand All @@ -41,6 +44,7 @@ export const system = (props: SystemProps & ThemeProp): CSSObject => ({
...flex(props),
...grid(props),
...layout(props),
...other(props),
...position(props),
...space(props),
...typography(props),
Expand Down
2 changes: 1 addition & 1 deletion test/utils/index.test.ts
Expand Up @@ -10,7 +10,7 @@ const theme: Theme = {
}

describe('get', () => {
it('should get value', () => {
it('should get theme value', () => {
expect(get('primary.500', theme, 'colors')).toBe(theme.colors?.['primary.500'])
})

Expand Down

0 comments on commit 362f237

Please sign in to comment.