File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ npm i react-async-elements
17
17
- [ ` <Video> ` ] ( #video )
18
18
- [ ` <Audio> ` ] ( #audio )
19
19
- [ ` <Preload> ` ] ( #preload )
20
+ - [ ` <Stylesheet> ` ] ( #stylesheet )
20
21
- [ ` <IFrame> ` ] ( #todo )
21
22
- [ ` <Embed> ` ] ( #todo )
22
- - [ ` <Stylesheet> ` ] ( #todo )
23
23
- [ Todo] ( #todo )
24
24
- [ Playing with Suspense] ( #playing-with-suspense )
25
25
- [ Authors] ( #authors )
@@ -172,6 +172,32 @@ function App() {
172
172
export default App ;
173
173
```
174
174
175
+ ### ` <Stylesheet> `
176
+
177
+ Lazy load a stylesheet.
178
+
179
+ ** props**
180
+
181
+ - ` href: string `
182
+
183
+ ``` js
184
+ import React from ' react' ;
185
+ import { Stylesheet } from ' react-async-elements' ;
186
+
187
+ function App () {
188
+ return (
189
+ < div>
190
+ < h1> Styles< / h1>
191
+ < React .Placeholder delayMs= {300 } fallback= {' loading...' }>
192
+ < Stylesheet href= " style.css" / >
193
+ < / React .Placeholder >
194
+ < / div>
195
+ );
196
+ }
197
+
198
+ export default App ;
199
+ ```
200
+
175
201
## Todo
176
202
177
203
- [ ] ` <IFrame> `
You can’t perform that action at this time.
0 commit comments