@edinelsonslima/toast-notification 0.1.47 → 0.1.48
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/.editorconfig +12 -0
- package/.eslintrc.cjs +18 -0
- package/README.md +6 -3
- package/index.es.js +1 -801
- package/index.html +12 -0
- package/minify.mjs +24 -0
- package/package.json +23 -37
- package/publish.sh +37 -0
- package/src/@types/index.ts +80 -0
- package/src/app/index.tsx +18 -0
- package/src/components/Toast/toast-container.component.tsx +68 -0
- package/src/components/Toast/toast-message.component.tsx +74 -0
- package/src/components/Toast/toast.styles.module.css +178 -0
- package/src/helpers/get-custom-css.helpers.ts +9 -0
- package/src/helpers/toast-content-sanitize.helpers.ts +15 -0
- package/src/helpers/toast-type.helpers.ts +15 -0
- package/src/helpers/toast.helper.ts +41 -0
- package/src/index.ts +10 -0
- package/src/services/event-manager.service.ts +42 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +26 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +33 -0
package/.editorconfig
ADDED
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
root: true,
|
|
3
|
+
env: { browser: true, es2020: true },
|
|
4
|
+
extends: [
|
|
5
|
+
'eslint:recommended',
|
|
6
|
+
'plugin:@typescript-eslint/recommended',
|
|
7
|
+
'plugin:react-hooks/recommended',
|
|
8
|
+
],
|
|
9
|
+
ignorePatterns: ['dist', '.eslintrc.cjs'],
|
|
10
|
+
parser: '@typescript-eslint/parser',
|
|
11
|
+
plugins: ['react-refresh'],
|
|
12
|
+
rules: {
|
|
13
|
+
'react-refresh/only-export-components': [
|
|
14
|
+
'warn',
|
|
15
|
+
{ allowConstantExport: true },
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
}
|
package/README.md
CHANGED
|
@@ -20,11 +20,11 @@ npm install @edinelsonslima/toast-notification
|
|
|
20
20
|
|
|
21
21
|
## 👨🏻💻 Modo de usar
|
|
22
22
|
- Adicione o componente `<ToastContainer/>` em algum lugar da sua aplicação;
|
|
23
|
-
- Importe os estilos css de `import '@edinelsonslima/toast-notification/style.css'`;
|
|
23
|
+
- Importe os estilos css de `import '@edinelsonslima/toast-notification/dist/style.css'`;
|
|
24
24
|
|
|
25
25
|
```tsx
|
|
26
26
|
import { ToastContainer } from '@edinelsonslima/toast-notification';
|
|
27
|
-
import '@edinelsonslima/toast-notification/style.css';
|
|
27
|
+
import '@edinelsonslima/toast-notification/dist/style.css';
|
|
28
28
|
|
|
29
29
|
export default function App(){
|
|
30
30
|
//seu código
|
|
@@ -63,7 +63,7 @@ export default function MyComponent(){
|
|
|
63
63
|
|--------------------|------------------------------------------------------------|
|
|
64
64
|
| ToastContainer | `classNames` `position` `defaultDuration` |
|
|
65
65
|
| toast | `content` `type` `duration` |
|
|
66
|
-
| style | `/style.css` |
|
|
66
|
+
| style | `/dist/style.css` |
|
|
67
67
|
|
|
68
68
|
#### As propriedades da função toast
|
|
69
69
|
|propriedade | toast |
|
|
@@ -110,3 +110,6 @@ toast.info(<strong>mensagem exemplo</strong>)
|
|
|
110
110
|
```tsx
|
|
111
111
|
toast.info(<MeuComponente>mensagem exemplo</MeuComponente>)
|
|
112
112
|
```
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|