use-css

Inject CSS into the shadowRoot

Inject tag style into shadowRoot with content given as parameter to use CSS.

Import

import { useCss } from "@atomico/hooks/use-css";

Sintaxis

useCss(cssText: string);

Example

Note

This hook was not created as a replacement for component.styles, it is rather a utility that seeks to facilitate the integration of css from a customHook, either by defining a state or another action.

Last updated