plataforma-fundacao-componentes 2.20.22 → 2.20.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +26 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,27 +1,43 @@
|
|
|
1
1
|
# plataforma-fundacao-componentes
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> feito com create-react-library
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/plataforma-fundacao-componentes) [](https://standardjs.com)
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Instalar
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install --save plataforma-fundacao-componentes
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Usar
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
Dois passos para utilizar os componentes
|
|
16
|
+
|
|
17
|
+
## 1) Importar o CSS no HOC da sua ferramenta
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
```tsx
|
|
19
20
|
import 'plataforma-fundacao-componentes/dist/index.css'
|
|
21
|
+
```
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
`*HOC: High Order Component: importamos no App.tsx ou App.jsx, mas também pode ser importado no index.tsx ou index.jsx`
|
|
24
|
+
|
|
25
|
+
## 2) Importar o componente e utilizar :P
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import React from 'react'
|
|
29
|
+
import { Button } from 'plataforma-fundacao-componentes'
|
|
30
|
+
|
|
31
|
+
export default function Example() {
|
|
32
|
+
return (
|
|
33
|
+
<Button
|
|
34
|
+
onClick={() => {
|
|
35
|
+
console.log('clicou')
|
|
36
|
+
}}
|
|
37
|
+
>
|
|
38
|
+
Clique
|
|
39
|
+
</Button>
|
|
40
|
+
)
|
|
25
41
|
}
|
|
26
42
|
```
|
|
27
43
|
|