@@ -14,7 +14,7 @@ on its contents.
14
14
15
15
``` js
16
16
import { useState } from ' react'
17
- import { Editor , RenderElement } from ' @compai/css-gui'
17
+ import { Editor , styled } from ' @compai/css-gui'
18
18
19
19
export const MyEditor = () => {
20
20
const [styles , setStyles ] = useState ({
@@ -26,9 +26,7 @@ export const MyEditor = () => {
26
26
return (
27
27
<>
28
28
< Editor styles= {styles} onChange= {setStyles} / >
29
- < RenderElement tagName= " p" styles= {styles}>
30
- Hello, world!
31
- < / RenderElement>
29
+ < styled .p styles= {styles}> Hello, world! < / styled .p >
32
30
< / >
33
31
)
34
32
}
@@ -42,7 +40,7 @@ used. You can compose inputs yourselves in this scenario:
42
40
``` js
43
41
import { useState } from ' react'
44
42
import Link from ' next/link'
45
- import { Editor , Inputs , RenderElement , codegen } from ' @compai/css-gui'
43
+ import { Editor , Inputs , styled , codegen } from ' @compai/css-gui'
46
44
47
45
export function Demo () {
48
46
const [styles , setStyles ] = useState ({})
@@ -67,7 +65,7 @@ export function Demo() {
67
65
< Inputs .Height / >
68
66
< / div>
69
67
< / Editor>
70
- < RenderElement tagName = " p " styles= {styles}>
68
+ < styled . p styles= {styles}>
71
69
“The parameters comprise sequences which are theoretically infinite but
72
70
limits are, of course, set to them in practice . There is an upward limit
73
71
to size and certainly a downward one... Within these sequences there are
@@ -82,7 +80,7 @@ export function Demo() {
82
80
Designing Programmes
83
81
< / a> by Karl Gerstner
84
82
< / em>
85
- < / RenderElement >
83
+ < / styled . p >
86
84
< pre> {codegen .css (styles)}< / pre>
87
85
< / >
88
86
)
0 commit comments