styles
Compiler-only StyleX-inspired declarations: each named style becomes a
class name, its variants picked by data attributes in the class list,
class={[sheet.card, { size: 'large' }]} (docs/styles.md#variants).
Utilização
Styling: one compiler, two entry points
import classes from './screen.css';
import { styles, VStack, Text } from 'kuito';
const sheet = styles({
card: { padding: 16, backgroundColor: '#17263b', borderRadius: 12 },
});
export function Card() {
return (
<VStack class={classes.panel}>
<Text class={sheet.card}>Hi</Text>
</VStack>
);
}Assinaturas
<T extends Record<string, StyleRule>>(_rules: T): { [K in keyof T]: string; }Parâmetros de tipo
| Nome | Restrição | Predefinição |
|---|---|---|
T | Record<string, StyleRule> | — |
Parâmetros
| Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|
_rules | T | Sim | — |
Devolve
{ [K in keyof T]: string; }
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.