Skip to content

Commit

Permalink
feat: added blurs in theme
Browse files Browse the repository at this point in the history
  • Loading branch information
hirotomoyamada committed Oct 8, 2023
1 parent 60d6bb5 commit 588a878
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .changeset/bright-knives-help.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@yamada-ui/theme': minor
'@yamada-ui/cli': minor
---

Added blurs in theme.
1 change: 1 addition & 0 deletions packages/cli/src/command/tokens/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const config: Config[] = [
{ key: 'lineHeights' },
{ key: 'radii' },
{ key: 'shadows' },
{ key: 'blurs' },
{ key: 'sizes', maxScanDepth: 2 },
{ key: 'spaces', flatMap: (value) => [value, `-${value}`] },
{ key: 'zIndices' },
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/generated-theme.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { UITheme } from './ui-theme.types'

export interface GeneratedTheme extends UITheme {
animations: string & {}
blurs: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | (string & {})
borders: string & {}
breakpoints: 'sm' | 'md' | 'lg' | 'xl' | '2xl' | (string & {})
colors:
Expand Down
1 change: 1 addition & 0 deletions packages/core/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type VarToken = {
export type VarTokens = Record<string, VarToken>

const tokens = [
'blurs',
'borders',
'breakpoints',
'colors',
Expand Down
9 changes: 9 additions & 0 deletions packages/theme/src/tokens/blurs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export type Blurs = typeof blurs

export const blurs = {
sm: '4px',
md: '8px',
lg: '12px',
xl: '16px',
'2xl': '24px',
}
2 changes: 2 additions & 0 deletions packages/theme/src/tokens/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { animations } from './animations'
import { blurs } from './blurs'
import { borders } from './borders'
import { breakpoints } from './breakpoints'
import { colors } from './colors'
Expand All @@ -17,6 +18,7 @@ import { zIndices } from './z-indices'

export default {
animations,
blurs,
borders,
breakpoints,
colors,
Expand Down

0 comments on commit 588a878

Please sign in to comment.