File tree Expand file tree Collapse file tree 1 file changed +12
-16
lines changed
Expand file tree Collapse file tree 1 file changed +12
-16
lines changed Original file line number Diff line number Diff line change @@ -83,30 +83,27 @@ Devup UI eliminates the performance degradation of the browser through the CSS i
8383We develop a preprocessor that considers all grammatical cases.
8484
8585``` typescript
86- // Before
87- < Box bg = {" red" }/ >
88- // After
89- < Box className = {" d0" }/ >
86+ const before = <Box bg = {" red" }/>
87+
88+ const after = <div className = " d0" />
9089```
9190
9291Variables are fully supported.
9392
9493```typescript
95- // Before
96- < Box bg = {colorVariable }/ >
97- // After
98- < Box className = {" d0" } style = {{
94+ const before = <Box bg = {colorVariable}/>
95+
96+ const after = <div className = " d0" style = {{
9997 " --d0" : colorVariable
10098}}/>
10199```
102100
103101Various expressions and responsiveness are also fully supported.
104102
105103```typescript
106- // Before
107- < Box bg = {[" red" , " blue" , a > b ? " yellow" : variable ]}/>
108- // After
109- <Box className={`d0 d1 ${a > b ? "d2" : " d3" }` } style={{
104+ const before = <Box bg = {[" red" , " blue" , a > b ? " yellow" : variable ]}/>
105+
106+ const after = <div className = {` d0 d1 ${a > b ? " d2" : " d3" } ` } style = {{
110107 " --d2" : variable
111108}}/>
112109```
@@ -141,9 +138,8 @@ You can use responsive and pseudo selector.
141138
142139```typescript
143140// Responsive with Selector
144- <Box _hover={{bg: ["red", "blue"]}}/>
145-
146- // Another way
147- <Box _hover={[{bg: "red"}, {bg: "blue"}]}/>
141+ const box = <Box _hover = {{bg: [" red" , " blue" ]}}/>
148142
143+ // Same
144+ const box = <Box _hover = {[{bg: " red" }, {bg: " blue" }]}/>
149145```
You can’t perform that action at this time.
0 commit comments