@noema/hyle
Version:
10 lines (9 loc) • 588 B
TypeScript
import { CSSProps, HyleStyle } from './hyle-style.js';
import { Elements, hyle, SprinklesFn } from './hyle.js';
/**
* Creates a set of Hyle components from an array of HTML element types
*/
export declare function primordials<E extends readonly Elements[], S extends SprinklesFn, P extends CSSProps, SH extends string = string>(elements: E, sprinkles: S, hyleStyle: HyleStyle<P, SH>): { [K in E[number]]: ReturnType<typeof hyle<K, S, P, SH>>; };
export type PrimordialProps<Components> = {
[E in keyof Components]: Components[E] extends React.ComponentType<infer P> ? P : never;
};