@react-to-styled/loader
Version:
69 lines (49 loc) • 1.82 kB
Markdown
[](https://github.com/react-to/react-to-styled/blob/main/LICENSE)
[](https://github.com/react-to/react-to-styled/graphs/contributors)
[](https://www.npmjs.com/package/@react-to-styled/loader)
[](https://www.npmjs.com/package/@react-to-styled/loader)
[](https://github.com/react-to/react-to-styled/labels/good%20first%20issue)
[](https://www.npmjs.com/package/@react-to-styled/loader)
# React to styled loader
Package for simple css-in-js loader component.
## Installation
We suggest this package to be imported
Install with npm:
```sh
npm install @react-to-styled/loader
```
Install with yarn:
```sh
yarn add @react-to-styled/loader
```
## Import
```tsx
import { Loader, LoaderProps } from '@react-to-styled/loader'
```
## Dependencies
All our components depend on these dependencies
```json
{
"peerDependencies": {
"react": ">=16.8.0",
"react-dom": ">=16.8.0",
"styled-components": ">=5"
}
}
```
## Usage
Here is a quick example how to add Loader:
```jsx
import React from 'react'
import ReactDOM from 'react-dom'
import { Loader } from '@react-to-styled/loader'
function App() {
return (
<div>
<Loader />
</div>
)
}
ReactDOM.render(<App />, document.querySelector('#app'))
```
You can also check our [storybook](https://react-to.github.io/react-to-styled) for more examples