Home > @css-hooks/core > Hooks
Hooks type
An object containing the functions needed to support and use the configured hooks
Signature:
export type Hooks<ConfiguredHooks extends readonly Hook[], CSSProperties, CSSPropertyConflicts extends object> = { on: <OverrideCSSProperties extends CSSProperties, BaseCSSProperties extends CSSProperties>(condition: Condition<ConfiguredHooks[number]>, overrideStyle: OverrideCSSProperties) => (style: CSSProperties & CSSPropertiesWithoutConflicts<BaseCSSProperties, CSSPropertyConflicts, OverrideCSSProperties>) => Omit<BaseCSSProperties, keyof OverrideCSSProperties> & OverrideCSSProperties; and: <C extends Condition<ConfiguredHooks[number]>[]>(...conditions: C) => { and: C; }; or: <C extends Condition<ConfiguredHooks[number]>[]>(...conditions: C) => { or: C; }; not: <C extends Condition<ConfiguredHooks[number]>>(condition: C) => { not: C; }; styleSheet: () => string; } & (string extends FlagName<ConfiguredHooks> ? unknown : { enable: (flag: FlagName<ConfiguredHooks>) => FlagStyle; disable: (flag: FlagName<ConfiguredHooks>) => FlagStyle; });