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
-:gear:**Customizable:** Feel free to change the colors, speed, sizes and even **RTL**;
12
+
-:gear:**Customizable:** Feel free to change the colors, speed, sizes, and even **RTL**;
13
13
-:ok_hand:**Plug and play:** with many presets to use, see the [examples](http://danilowoz.com/create-content-loader/#gallery);
14
14
-:pencil2:**DIY:** use the [create-content-loader](https://danilowoz.com/create-content-loader) to create your own custom loaders easily;
15
15
- 📱 **React Native support**: same API, as same powerful features;
@@ -207,7 +207,7 @@ const MyLoader = () => (
207
207
208
208
#### Responsive - Mobile version
209
209
210
-
In order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means:
210
+
In order to avoid unexpected behavior, the package doesn't have opinioned settings. So if it needs to be responsive, have in mind that the output of the package is a regular SVG, so it just needs the same attributes to become a regular SVG responsive, which means:
211
211
212
212
```jsx
213
213
import { Code } from'react-content-loader'
@@ -257,15 +257,15 @@ When using `rgba` as a `backgroundColor` or `foregroundColor` value, [S
257
257
258
258
#### **Black box in Safari / iOS (again)**
259
259
260
-
Using the base tag on a page that contains SVG elements fails to render and it looks like a black box. Just remove the **base-href** tag from the `<head />` and issue solved.
260
+
Using the base tag on a page that contains SVG elements fails to render and it looks like a black box. Just remove the **base-href** tag from the `<head />` and the issue has been solved.
Old browser doesn't support animation in SVG ([compatibility list](https://caniuse.com/#search=SVGAnimateElement)), and if your project must support IE for examples, here's a couple of ways to make sure that browser supports SVG Animate:
268
+
Old browsers don't support animation in SVG ([compatibility list](https://caniuse.com/#search=SVGAnimateElement)), and if your project must support IE, for examples, here's a couple of ways to make sure that browser supports SVG Animate:
@@ -282,7 +282,7 @@ Old browser doesn't support animation in SVG ([compatibility list](https://caniu
282
282
283
283
## Development
284
284
285
-
Fork the repo then clone it
285
+
Fork the repo and then clone it
286
286
287
287
```
288
288
$ git clone [email protected]:YourUsername/react-content-loader.git && cd react-content-loader
@@ -292,15 +292,24 @@ $ git clone [email protected]:YourUsername/react-content-loader.git && cd rea
292
292
293
293
`$ npm run build`: Build to production;
294
294
295
-
`$ npm run dev`: Run the docz to see your changes;
295
+
`$ npm run dev`: Run the Storybook to see your changes;
296
+
297
+
`$ npm run deploy:docs`: Deploy Storybook to the Github pages;
296
298
297
299
`$ npm run test`: Run all tests: type checking, unit tests on web and native;
298
300
299
-
`$ yarn test:watch`: Watch unit tests;
301
+
`$ npm run test:watch`: Watch unit tests;
302
+
303
+
### React Native
300
304
301
-
`$ yarn tsc`: Typescript checking;
305
+
As React Native doesn't support symbolic links (to link the dependency to another folder) and as there is no playground to check your contributions (like storybook), this is recommended strategy to run the project locally:
302
306
303
-
`$ yarn tsc:watch`: Typescript checking with watching;
307
+
1. Create a new React Native from scratch, either Metro or create-react-native-app;
308
+
2. Install the dependency to your root project:
309
+
`yarn add react-content-loader react-native-svg`
310
+
3. Open the project just created and clone this repository there;
311
+
4. Create your loading component and point the `react-content-loader` to the project just cloned, like:
312
+
`import ContentLoader, { Rect, Circle } from './react-content-loader/native'`
0 commit comments