Packages
@twind/core › Context
Type parameters
| Name | Type |
|---|---|
Theme | extends BaseTheme = BaseTheme |
Properties
e
• e: (value: string) => string
Type declaration
▸ (value): string
escapes given string for use in a CSS selector or variable
Parameters
| Name | Type |
|---|---|
value | string |
Returns
string
Defined in
h
• h: (value: string) => string
Type declaration
▸ (value): string
create hash of given string — may be no-op eg returning the same input
Parameters
| Name | Type |
|---|---|
value | string |
Returns
string
Defined in
theme
• theme: ThemeFunction<Theme>
Allows to resolve theme values.
Defined in
d
• Private d: (section: string, key: string, color: ColorValue) => undefined | null | string | false | void | ColorFunction
Type declaration
▸ Private (section, key, color): undefined | null | string | false | void | ColorFunction
returns the dark color
Parameters
| Name | Type |
|---|---|
section | string |
key | string |
color | ColorValue |
Returns
undefined | null | string | false | void | ColorFunction
Defined in
packages/core/src/types.ts:104
f
• Private f: (rule: TwindRule) => TwindRule
Type declaration
▸ Private (rule): TwindRule
called right before the rule is stringified and inserted into the sheet
Parameters
| Name | Type |
|---|---|
rule | TwindRule |
Returns
Defined in
packages/core/src/types.ts:132
r
• Private r: (value: string, isDark?: boolean) => RuleResult
Type declaration
▸ Private (value, isDark?): RuleResult
resolves a rule
Parameters
| Name | Type |
|---|---|
value | string |
isDark? | boolean |
Returns
Defined in
packages/core/src/types.ts:118
s
• Private s: (property: string, value: string) => string
Type declaration
▸ Private (property, value): string
stringifies a CSS property and value to a declaration
Parameters
| Name | Type |
|---|---|
property | string |
value | string |
Returns
string
Defined in
packages/core/src/types.ts:125
v
• Private v: (value: string) => MaybeArray<string>
Type declaration
▸ Private (value): MaybeArray<string>
resolves a variant
Parameters
| Name | Type |
|---|---|
value | string |
Returns
MaybeArray<string>