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
Copy file name to clipboardExpand all lines: README.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,12 +2,12 @@
2
2
A library to load and tree shake standard CSS with a simple, flexible interface allowing you to only load the CSS you need and want, dependent on if your react components are rendering.
3
3
4
4
## Getting started
5
-
To install run `npm install react-css-loader --save`
5
+
To install run `npm install @mintuz/react-css-loader --save`
6
6
7
7
## Usage
8
8
9
9
### Client
10
-
React CSS Loader provides a Higher Order Component which you pass your own components into and optionally an object as a second paramter with a function called `styles`.
10
+
React CSS Loader provides a Higher Order Component which you pass your own components into and optionally an object as a second parameter with a function called `styles`.
11
11
12
12
When a displayName is present on your component, react-css-loader will try to resolve the displayName to a css file on the server. For example if you had a displayName of `Header` it will try to resolve to `Header.css`.
13
13
@@ -16,7 +16,7 @@ You can also define your own styles using the styles function which should retur
16
16
```
17
17
/* ./app.js */
18
18
import React from 'react';
19
-
import {StaticCSS as CSS} from 'react-css-loader';
19
+
import {StaticCSS as CSS} from '@mintuz/react-css-loader';
20
20
21
21
const MyComponent = () => {
22
22
return <div className="my-custom-element"/>;
@@ -43,7 +43,7 @@ The file system adapter will resolve css files from your local file system and a
43
43
44
44
```
45
45
import App from './app'; /* React application */
46
-
import {Resolver, FileSystemAdapter} from 'react-css-loader';
46
+
import {Resolver, FileSystemAdapter} from '@mintuz/react-css-loader';
47
47
48
48
const cssResolver = new Resolver(App, new FileSystemAdapter({
49
49
folderPath: `${__dirname}/styles/`,
@@ -70,7 +70,7 @@ console.log(cssString);
70
70
71
71
```
72
72
import App from './app';
73
-
import {Resolver, FileSystemAdapter} from 'react-css-loader';
73
+
import {Resolver, FileSystemAdapter} from '@mintuz/react-css-loader';
74
74
75
75
const cssResolver = new Resolver(App, new FileSystemAdapter({
76
76
folderPath: `${__dirname}/styles/`,
@@ -95,7 +95,7 @@ If you serve your CSS via a CDN, this is for you. Rather than resolving the CSS
95
95
96
96
```
97
97
import App from './app';
98
-
import {Resolver, CDNAdapter} from 'react-css-loader';
98
+
import {Resolver, CDNAdapter} from '@mintuz/react-css-loader';
99
99
100
100
const cssResolver = new Resolver(App, new CDNAdapter({
0 commit comments