upconta.frontend-utils 1.0.22 → 1.0.23
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/.dist/cjs/index.js +1 -1
- package/.dist/cjs/index.js.map +1 -1
- package/.dist/esm/index.js +2 -2
- package/.dist/esm/index.js.map +1 -1
- package/.dist/style/main.css +5 -1
- package/Readme.md +50 -0
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -0
package/.dist/style/main.css
CHANGED
package/Readme.md
CHANGED
|
@@ -17,3 +17,53 @@ pnpm run build -w
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
La aplicación en next debe utilizar los **archivos compilados**.
|
|
20
|
+
|
|
21
|
+
## Dependencias
|
|
22
|
+
|
|
23
|
+
Las siguientes dependencias deben ser instaladas en los proyectos que utilicen esta librería
|
|
24
|
+
|
|
25
|
+
```zsh
|
|
26
|
+
pnpm add antd -P
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
# Características
|
|
30
|
+
|
|
31
|
+
## Estilos de UpConta
|
|
32
|
+
|
|
33
|
+
Las siguientes son un conjunto de configuraciones para que los proyectos que utilicen esta librería puedan tener el estilo de UpConta.
|
|
34
|
+
|
|
35
|
+
Se debe agregar el `margin: 0` al body del proyecto:
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { Html, Head, Main, NextScript } from "next/document";
|
|
39
|
+
|
|
40
|
+
export default function Document() {
|
|
41
|
+
return (
|
|
42
|
+
<Html lang="en">
|
|
43
|
+
<Head />
|
|
44
|
+
<body style={{ margin: 0 }}>
|
|
45
|
+
<Main />
|
|
46
|
+
<NextScript />
|
|
47
|
+
</body>
|
|
48
|
+
</Html>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
El estilo principal de UpConta y las configuraciones para Ant Design se encuentran dentro del componente `TemaPrincipal` y debe utilizarse de la siguiente manera
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
// _app.tsx
|
|
59
|
+
import { TemaPrincipal } from "upconta.frontend-utils"
|
|
60
|
+
|
|
61
|
+
export default function App({ Component, pageProps }: AppProps) {
|
|
62
|
+
return (
|
|
63
|
+
<TemaPrincipal>
|
|
64
|
+
<Component {...pageProps} />;
|
|
65
|
+
<Button>Primary Button</Button>
|
|
66
|
+
</TemaPrincipal>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|