@atomico/hooks
Advanced tools
Comparing version 3.28.0 to 3.29.0
{ | ||
"name": "@atomico/hooks", | ||
"description": "Series of utilities in hooks format to extend the operation of Atomico", | ||
"version": "3.28.0", | ||
"version": "3.29.0", | ||
"type": "module", | ||
@@ -36,2 +36,3 @@ "workspaces": [ | ||
"./use-click-coordinates": "./src/use-click-coordinates/use-click-coordinates.js", | ||
"./use-click-press": "./src/use-click-press/use-click-press.js", | ||
"./use-controller": "./src/use-controller/use-controller.js", | ||
@@ -96,2 +97,5 @@ "./use-copy": "./src/use-copy/use-copy.js", | ||
], | ||
"use-click-press": [ | ||
"./types/use-click-press/use-click-press.d.ts" | ||
], | ||
"use-controller": [ | ||
@@ -98,0 +102,0 @@ "./types/use-controller/use-controller.d.ts" |
# Documentation in [👉 atomico.gitbook.io/doc](https://atomico.gitbook.io/doc/v/es/atomico/atomico-hooks) | ||
```js | ||
import { css } from "atomico"; | ||
import { useCssLightDom } from "@atomico/hooks/use-css-light-dom"; | ||
const sheet = css` | ||
:host { | ||
width: 200px; | ||
height: 200px; | ||
background: black; | ||
} | ||
`; | ||
function component() { | ||
useCssLightDom(sheet); | ||
return <host></host>; | ||
} | ||
``` | ||
Limitaciones: | ||
1. Un solo sheet por `useCssLightDom`. | ||
2. El nodo queda expuesto en el lightDOM. |
80001
101
2378
2