Skip to content

Commit

Permalink
Update ModeDefinitions type in config/index.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
1aron committed Apr 24, 2024
1 parent 1b101c4 commit fa7a6ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/core/src/config/index.ts
Expand Up @@ -47,7 +47,7 @@ export type StyleDefinitions = { [key: string]: string | StyleDefinitions }
export type RuleDefinitions = { [key in keyof typeof rules | string]?: RuleDefinition }
export type VariableDefinitions = { [key in keyof typeof rules]?: VariableDefinition } & { [key: string]: VariableDefinition }
export type UtilityDefinitions = { [key in keyof typeof utilities]?: PropertiesHyphen } & { [key: string]: PropertiesHyphen }
export type ModeDefinitions = { [key: string]: 'class' | 'media' | 'host' }
export type ModeDefinitions = { [key: string]: 'class' | 'media' | 'host' | false }
export interface FunctionDefinition {
unit?: string
transform?(this: Rule, value: string, bypassVariableNames: string[]): string | ValueComponent[]
Expand All @@ -69,5 +69,5 @@ export interface Config {
override?: boolean
functions?: FunctionDefinitions
animations?: AnimationDefinitions
modes?: Record<string, 'class' | 'media' | 'host' | false>
modes?: ModeDefinitions
}
4 changes: 3 additions & 1 deletion packages/core/tests/config/colors/hex.test.ts
@@ -1,3 +1,5 @@
import { Config } from '../../../src'

/**
* 1. 000000
* 2. { space: 'rgb', value: '0 0 0' }
Expand All @@ -16,7 +18,7 @@ test('color/opacity to rgb(r g b/opacity)', () => {
})

describe('with themes', () => {
const config = {
const config: Config = {
variables: {
primary: {
'': '#000000',
Expand Down

0 comments on commit fa7a6ee

Please sign in to comment.