StyleProps
Props of Style: the CSS text and an optional key that replaces an earlier style with the same key.
Props of Style: the CSS text and an optional key that replaces an earlier style with the same key.
Import#
ts
import type { StyleProps } from "@shadow-js/web";
Signature#
ts
interface StyleProps {
/**
* The CSS text: a string, a number, an array of those, or an accessor returning them.
* @default undefined (the style has no text)
*/
readonly children?: unknown;
/**
* Identity of the style: a later style with the same key replaces an earlier one. Must be a
* non-empty string.
* @default undefined (the style has no identity and always stays)
*/
readonly key?: unknown;
/** One attribute of the `<style>` element, such as `media`, with the same rules as {@link HeadAttributeProps}. */
readonly [attribute: string]: unknown;
}
Members#
| Name | Type | Description |
|---|---|---|
children? |
readonly children?: unknown |
The CSS text: a string, a number, an array of those, or an accessor returning them. |
key? |
readonly key?: unknown |
Identity of the style: a later style with the same key replaces an earlier one. Must be a non-empty string. |