You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/content/overview/quick-start.mdx
+3-4Lines changed: 3 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ export default defineConfig({
59
59
60
60
### Non React usage
61
61
62
-
```jsx
62
+
```ts title="App.ts"
63
63
import { css } from'@pigment-css/react';
64
64
65
65
const visuallyHidden =css({
@@ -87,9 +87,8 @@ const visuallyHidden2 = css`
87
87
width: 1px;
88
88
`;
89
89
90
-
functionApp() {
91
-
return<div {...visuallyHidden()}>I am invisible</div>;
92
-
}
90
+
const element =document.getElemenyById('app');
91
+
element.className=visuallyHidden().className;
93
92
```
94
93
95
94
Which API signature to use is totally on the requirements. Somethings are easier with the tagged-template literal signature like copy-pasting css from other source (Figma for example) but it requires editor integration. For example, [vscode-styled-components](https://marketplace.visualstudio.com/items?itemName=styled-components.vscode-styled-components) extension needs to be installed to get completions and syntax highlighting in VSCode.
0 commit comments