vpt-sebraeds 0.0.65 → 0.0.67
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 +165 -13
- package/components/FilterTag/index.jsx +3 -3
- package/components/Header/Header.stories.jsx +24 -78
- package/components/Header/HeaderV2.stories.jsx +1019 -0
- package/components/Header/index.jsx +4 -230
- package/components/Header/{components → v1/components}/Context.jsx +3 -2
- package/components/Header/{components → v1/components}/Information.jsx +13 -13
- package/components/Header/{components → v1/components}/Shortcut.jsx +3 -9
- package/components/Header/{components → v1/components}/SwitchAccount.jsx +48 -51
- package/components/Header/v1/components/Variants.jsx +478 -0
- package/components/Header/{components → v1/components}/index.jsx +2 -2
- package/components/Header/v1/index.jsx +195 -0
- package/components/Header/v2/README.md +724 -0
- package/components/Header/v2/index.jsx +212 -0
- package/components/Header/v2/parts/Context.jsx +25 -0
- package/components/Header/v2/parts/Hero.jsx +59 -0
- package/components/Header/v2/parts/Information.jsx +66 -0
- package/components/Header/v2/parts/Shortcut.jsx +39 -0
- package/components/Header/v2/parts/SwitchAccount.jsx +152 -0
- package/components/Header/v2/parts/Variants.jsx +316 -0
- package/components/Header/v2/parts/index.jsx +19 -0
- package/components/Header/v2/styles.js +534 -0
- package/components/RangeSlider/index.tsx +9 -3
- package/components/SEText/index.js +1 -1
- package/dist/components/FilterTag/index.d.ts +2 -1
- package/dist/components/FilterTag/index.d.ts.map +1 -1
- package/dist/components/FilterTag/index.js +3 -3
- package/dist/components/Header/index.d.ts +4 -34
- package/dist/components/Header/index.d.ts.map +1 -1
- package/dist/components/Header/index.js +4 -194
- package/dist/components/Header/v1/components/Context.d.ts +8 -0
- package/dist/components/Header/v1/components/Context.d.ts.map +1 -0
- package/dist/components/Header/v1/components/Context.js +21 -0
- package/dist/components/Header/v1/components/Information.d.ts +7 -0
- package/dist/components/Header/v1/components/Information.d.ts.map +1 -0
- package/dist/components/Header/v1/components/Information.js +72 -0
- package/dist/components/Header/v1/components/Shortcut.d.ts +6 -0
- package/dist/components/Header/v1/components/Shortcut.d.ts.map +1 -0
- package/dist/components/Header/v1/components/Shortcut.js +18 -0
- package/dist/components/Header/v1/components/SwitchAccount.d.ts +9 -0
- package/dist/components/Header/v1/components/SwitchAccount.d.ts.map +1 -0
- package/dist/components/Header/v1/components/SwitchAccount.js +167 -0
- package/dist/components/Header/v1/components/Variants.d.ts +23 -0
- package/dist/components/Header/v1/components/Variants.d.ts.map +1 -0
- package/dist/components/Header/v1/components/Variants.js +371 -0
- package/dist/components/Header/v1/components/index.d.ts +34 -0
- package/dist/components/Header/v1/components/index.d.ts.map +1 -0
- package/dist/components/Header/v1/components/index.js +10 -0
- package/dist/components/Header/v1/index.d.ts +4 -0
- package/dist/components/Header/v1/index.d.ts.map +1 -0
- package/dist/components/Header/v1/index.js +159 -0
- package/dist/components/Header/v2/index.d.ts +8 -0
- package/dist/components/Header/v2/index.d.ts.map +1 -0
- package/dist/components/Header/v2/index.js +175 -0
- package/dist/components/Header/v2/parts/Context.d.ts +7 -0
- package/dist/components/Header/v2/parts/Context.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/Context.js +18 -0
- package/dist/components/Header/v2/parts/Hero.d.ts +23 -0
- package/dist/components/Header/v2/parts/Hero.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/Hero.js +45 -0
- package/dist/components/Header/v2/parts/Information.d.ts +6 -0
- package/dist/components/Header/v2/parts/Information.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/Information.js +33 -0
- package/dist/components/Header/v2/parts/Shortcut.d.ts +5 -0
- package/dist/components/Header/v2/parts/Shortcut.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/Shortcut.js +15 -0
- package/dist/components/Header/v2/parts/SwitchAccount.d.ts +8 -0
- package/dist/components/Header/v2/parts/SwitchAccount.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/SwitchAccount.js +113 -0
- package/dist/components/Header/v2/parts/Variants.d.ts +45 -0
- package/dist/components/Header/v2/parts/Variants.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/Variants.js +218 -0
- package/dist/components/Header/v2/parts/index.d.ts +56 -0
- package/dist/components/Header/v2/parts/index.d.ts.map +1 -0
- package/dist/components/Header/v2/parts/index.js +17 -0
- package/dist/components/Header/v2/styles.d.ts +900 -0
- package/dist/components/Header/v2/styles.d.ts.map +1 -0
- package/dist/components/Header/v2/styles.js +533 -0
- package/dist/components/RangeSlider/index.d.ts.map +1 -1
- package/dist/components/RangeSlider/index.js +7 -2
- package/dist/components/SEText/index.js +1 -1
- package/package.json +3 -4
- package/components/Header/components/Variants.jsx +0 -476
package/README.md
CHANGED
|
@@ -14,25 +14,37 @@
|
|
|
14
14
|
|
|
15
15
|
Este é o repositório do Design System em React Native desenvolvido para o projeto Sebrae Na Palma da Mão. O objetivo é fornecer uma biblioteca de componentes reutilizáveis que seguem os padrões visuais e de interação do Sebrae, garantindo consistência e eficiência no desenvolvimento do aplicativo principal.
|
|
16
16
|
|
|
17
|
-
##
|
|
18
|
-
|
|
19
|
-
Atualmente, o Design System conta com os seguintes componentes:
|
|
17
|
+
## ✅ Requisitos
|
|
20
18
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- **Input**: Campos de entrada de texto padronizados
|
|
19
|
+
- Node.js >= 18 ([package.json](file:///Users/tegra/sebrae/storybook/dev/package.json#L107-L109))
|
|
20
|
+
- React 19 e React Native 0.79 (peer/dev deps)
|
|
21
|
+
- Yarn ou npm/pnpm instalado
|
|
22
|
+
- Xcode (iOS) e Android SDK/Java (Android)
|
|
26
23
|
|
|
27
|
-
##
|
|
28
|
-
|
|
29
|
-
1. **Instalação das dependências:**
|
|
24
|
+
## 🔧 Instalação
|
|
30
25
|
|
|
31
26
|
```bash
|
|
32
27
|
yarn
|
|
28
|
+
# ou
|
|
29
|
+
npm install
|
|
33
30
|
```
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
## 🎨 Componentes Disponíveis
|
|
33
|
+
|
|
34
|
+
- Exportados via [src/index.ts](file:///Users/tegra/sebrae/storybook/dev/src/index.ts)
|
|
35
|
+
- Histórias em `*.stories.(jsx|tsx)` ao lado de cada componente
|
|
36
|
+
- Veja a lista completa em [components/](file:///Users/tegra/sebrae/storybook/dev/components) ou rode o Storybook
|
|
37
|
+
|
|
38
|
+
Exemplos de componentes:
|
|
39
|
+
|
|
40
|
+
- Accordion, Button, Checkbox, FilterTag, Input, Modal, Navbar, Pagination,
|
|
41
|
+
Datepicker, Dropdown, Card, Toast, Typography, SEIcon, SEText, e muitos outros.
|
|
42
|
+
|
|
43
|
+
## 🚀 Como Usar
|
|
44
|
+
|
|
45
|
+
1. **Instale as dependências** (acima).
|
|
46
|
+
|
|
47
|
+
2. **Execute o Storybook (nativo):**
|
|
36
48
|
|
|
37
49
|
Para iOS:
|
|
38
50
|
```bash
|
|
@@ -44,9 +56,23 @@ Para Android:
|
|
|
44
56
|
yarn storybook:android
|
|
45
57
|
```
|
|
46
58
|
|
|
59
|
+
3. **Execute o Storybook (web):**
|
|
60
|
+
```bash
|
|
61
|
+
yarn storybook:web
|
|
62
|
+
# abre em http://localhost:6006
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
4. **Gerar histórias automaticamente (opcional):**
|
|
66
|
+
```bash
|
|
67
|
+
yarn storybook-generate
|
|
68
|
+
```
|
|
69
|
+
|
|
47
70
|
## 📚 Storybook
|
|
48
71
|
|
|
49
|
-
Cada componente possui sua própria história no Storybook, permitindo visualizar e testar diferentes estados e propriedades. As histórias estão localizadas junto aos componentes com o padrão de nomenclatura `*.stories.jsx`.
|
|
72
|
+
Cada componente possui sua própria história no Storybook, permitindo visualizar e testar diferentes estados e propriedades. As histórias estão localizadas junto aos componentes com o padrão de nomenclatura `*.stories.(jsx|tsx)`.
|
|
73
|
+
|
|
74
|
+
- Nativo: `storybook:ios` e `storybook:android`
|
|
75
|
+
- Web: `storybook:web` ([@storybook/react-native-web-vite](file:///Users/tegra/sebrae/storybook/dev/package.json#L80-L83))
|
|
50
76
|
|
|
51
77
|
## 🔗 Integração com o Projeto Principal
|
|
52
78
|
|
|
@@ -59,6 +85,131 @@ Este Design System é um artefato do projeto principal [Sebrae Na Palma da Mão]
|
|
|
59
85
|
- Suporte a chat e preview de links
|
|
60
86
|
- E muito mais
|
|
61
87
|
|
|
88
|
+
### Instalação do React Design System (via Git + branch)
|
|
89
|
+
|
|
90
|
+
Instale diretamente a partir do repositório Git (escolha a branch conforme sua necessidade: `main`, `develop`, `feature/...`).
|
|
91
|
+
|
|
92
|
+
- Repositório: `git@gitlab.sebrae.com.br:na/java/na-palma-da-mao/app-sebrae-react-ds.git`
|
|
93
|
+
|
|
94
|
+
Compatibilidade mínima:
|
|
95
|
+
- Node.js 18+ (recomendado 20+)
|
|
96
|
+
- React 18 ou 19
|
|
97
|
+
|
|
98
|
+
Comandos (SSH):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
|
|
102
|
+
# yarn
|
|
103
|
+
yarn add git+ssh://git@gitlab.sebrae.com.br/na/java/na-palma-da-mao/app-sebrae-react-ds.git#develop
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Outras branches:
|
|
108
|
+
|
|
109
|
+
```bash
|
|
110
|
+
# main
|
|
111
|
+
yarn add git+ssh://git@gitlab.sebrae.com.br/na/java/na-palma-da-mao/app-sebrae-react-ds.git#main
|
|
112
|
+
|
|
113
|
+
# develop
|
|
114
|
+
yarn add git+ssh://git@gitlab.sebrae.com.br/na/java/na-palma-da-mao/app-sebrae-react-ds.git#develop
|
|
115
|
+
|
|
116
|
+
# feature (com barra, use aspas)
|
|
117
|
+
yarn add "git+ssh://git@gitlab.sebrae.com.br/na/java/na-palma-da-mao/app-sebrae-react-ds.git#feature/minha-feature"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Via package.json:
|
|
121
|
+
|
|
122
|
+
```json
|
|
123
|
+
{
|
|
124
|
+
"dependencies": {
|
|
125
|
+
"vpt-sebraeds": "git+ssh://git@gitlab.sebrae.com.br/na/java/na-palma-da-mao/app-sebrae-react-ds.git#main"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Observação: nesta biblioteca, o campo "name" é `vpt-sebraeds`.
|
|
131
|
+
|
|
132
|
+
Dependências e pós-instalação:
|
|
133
|
+
- Instale todos os peerDependencies declarados pelo Design System (ex.: react, react-dom, bibliotecas de estilo/animação se aplicável). Verifique o `package.json` do repositório.
|
|
134
|
+
- Configure a fonte Nunito no app consumidor. Veja [FONTES_CONFIGURACAO.md](file:///Users/tegra/sebrae/storybook/dev/FONTES_CONFIGURACAO.md).
|
|
135
|
+
|
|
136
|
+
Exemplo de uso:
|
|
137
|
+
|
|
138
|
+
```tsx
|
|
139
|
+
import { Button } from 'vpt-sebraeds'
|
|
140
|
+
|
|
141
|
+
export function Exemplo() {
|
|
142
|
+
return <Button variant="primary">Confirmar</Button>
|
|
143
|
+
}
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Troubleshooting (GitLab/SSH):
|
|
147
|
+
- Permission denied (publickey):
|
|
148
|
+
- Gere/adicione sua chave SSH ao GitLab (`ssh-keygen -t rsa`), inicie o agente (`eval \"$(ssh-agent -s)\"`) e `ssh-add ~/.ssh/id_rsa`.
|
|
149
|
+
- Teste: `ssh -T git@gitlab.sebrae.com.br`.
|
|
150
|
+
- Host key verification failed:
|
|
151
|
+
- Adicione o host: `ssh-keyscan -H gitlab.sebrae.com.br >> ~/.ssh/known_hosts`.
|
|
152
|
+
- Sem permissão ao repositório:
|
|
153
|
+
- Verifique se seu usuário/grupo possui acesso ao projeto no GitLab ou solicite um Deploy Key.
|
|
154
|
+
- Ambiente CI/CD:
|
|
155
|
+
- Configure a variável `SSH_PRIVATE_KEY` e injete-a no pipeline; adicione `known_hosts` do GitLab antes de `yarn install`.
|
|
156
|
+
- Alternativa HTTPS + Token Pessoal (quando SSH indisponível):
|
|
157
|
+
- `yarn add "https://oauth2:<PERSONAL_ACCESS_TOKEN>@gitlab.sebrae.com.br/na/java/na-palma-da-mao/app-sebrae-react-ds.git#main"`
|
|
158
|
+
- Mantenha o token fora do controle de versão e variáveis de ambiente seguras.
|
|
159
|
+
|
|
160
|
+
### Consumo dos componentes
|
|
161
|
+
|
|
162
|
+
Após publicar/compilar, importe os componentes diretamente do pacote (ou via path local no monorepo):
|
|
163
|
+
|
|
164
|
+
```tsx
|
|
165
|
+
import { Button, Modal, Typography } from 'vpt-sebraeds';
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Os exports estão definidos em [src/index.ts](file:///Users/tegra/sebrae/storybook/dev/src/index.ts).
|
|
169
|
+
|
|
170
|
+
## 🧪 Testes e Qualidade
|
|
171
|
+
|
|
172
|
+
- Linter:
|
|
173
|
+
```bash
|
|
174
|
+
yarn lint
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
- Testes:
|
|
178
|
+
```bash
|
|
179
|
+
yarn test
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
## 🏗️ Build e Publicação
|
|
183
|
+
|
|
184
|
+
- Build TypeScript + cópia de assets:
|
|
185
|
+
```bash
|
|
186
|
+
yarn build
|
|
187
|
+
# tsc + [scripts/copy-assets.js](file:///Users/tegra/sebrae/storybook/dev/scripts/copy-assets.js)
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
- Build Android (release apk do app de Storybook):
|
|
191
|
+
```bash
|
|
192
|
+
yarn build-android
|
|
193
|
+
# [scripts/build-android.sh](file:///Users/tegra/sebrae/storybook/dev/scripts/build-android.sh)
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
- Publicação (pré-publish roda o build automaticamente):
|
|
197
|
+
```bash
|
|
198
|
+
yarn publish
|
|
199
|
+
# ou npm publish (verifique acesso/registro)
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## 🗂️ Estrutura do Projeto
|
|
203
|
+
|
|
204
|
+
- `components/` – componentes e histórias
|
|
205
|
+
- `src/` – ponto de entrada e exports da biblioteca
|
|
206
|
+
- `assets/` – imagens, ícones e fontes
|
|
207
|
+
- `.rnstorybook/` e `.storybook/` – configs de Storybook nativo e web
|
|
208
|
+
- `scripts/` – automações de build
|
|
209
|
+
|
|
210
|
+
## 🔤 Fontes
|
|
211
|
+
|
|
212
|
+
Guia completo de configuração de fontes: [FONTES_CONFIGURACAO.md](file:///Users/tegra/sebrae/storybook/dev/FONTES_CONFIGURACAO.md)
|
|
62
213
|
## 🤝 Contribuição
|
|
63
214
|
|
|
64
215
|
Antes de adicionar novos componentes ou fazer modificações:
|
|
@@ -68,6 +219,7 @@ Antes de adicionar novos componentes ou fazer modificações:
|
|
|
68
219
|
3. Teste o componente em diferentes dispositivos
|
|
69
220
|
4. Certifique-se de que as alterações não quebram a compatibilidade com o projeto principal
|
|
70
221
|
|
|
222
|
+
5. Mantenha o estilo de código (ESLint/Prettier) e exports em [src/index.ts](file:///Users/tegra/sebrae/storybook/dev/src/index.ts)
|
|
71
223
|
## 📝 Licença
|
|
72
224
|
|
|
73
225
|
Este projeto está sob a licença MIT.
|
|
@@ -2,7 +2,7 @@ import React, { useState } from 'react';
|
|
|
2
2
|
import { TouchableOpacity, StyleSheet, View } from 'react-native';
|
|
3
3
|
import SEText from '../SEText';
|
|
4
4
|
|
|
5
|
-
const FilterTag = ({ label, onRemove }) => {
|
|
5
|
+
const FilterTag = ({ label, onRemove, color }) => {
|
|
6
6
|
const [isHovered, setIsHovered] = useState(false);
|
|
7
7
|
const [isFocused, setIsFocused] = useState(false);
|
|
8
8
|
|
|
@@ -24,9 +24,9 @@ const FilterTag = ({ label, onRemove }) => {
|
|
|
24
24
|
activeOpacity={0.8}
|
|
25
25
|
>
|
|
26
26
|
<View style={styles.content}>
|
|
27
|
-
<SEText type="ns-sm-body" style={styles.label}>{label}</SEText>
|
|
27
|
+
<SEText type="ns-sm-body" style={[styles.label, color && { color }]}>{label}</SEText>
|
|
28
28
|
<TouchableOpacity onPress={onRemove} style={styles.removeButton}>
|
|
29
|
-
<SEText type="ns-sm-body-bold" style={styles.removeIcon}>×</SEText>
|
|
29
|
+
<SEText type="ns-sm-body-bold" style={[styles.removeIcon, color && { color }]}>×</SEText>
|
|
30
30
|
</TouchableOpacity>
|
|
31
31
|
</View>
|
|
32
32
|
</TouchableOpacity>
|
|
@@ -3,7 +3,7 @@ import { View } from 'react-native';
|
|
|
3
3
|
import Header from '.';
|
|
4
4
|
|
|
5
5
|
const meta = {
|
|
6
|
-
title: 'Organisms/Header',
|
|
6
|
+
title: 'Organisms/Header/v1',
|
|
7
7
|
component: Header,
|
|
8
8
|
tags: ['autodocs'],
|
|
9
9
|
parameters: {
|
|
@@ -91,10 +91,7 @@ export const DefaultWithAddEnterpriseButton = {
|
|
|
91
91
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
92
92
|
}
|
|
93
93
|
},
|
|
94
|
-
render: (args) => {
|
|
95
|
-
const ref = React.useRef();
|
|
96
|
-
return <Header ref={ref} {...args} />;
|
|
97
|
-
},
|
|
94
|
+
render: (args) => <Header {...args} />,
|
|
98
95
|
};
|
|
99
96
|
|
|
100
97
|
export const Default = {
|
|
@@ -193,10 +190,7 @@ export const Default = {
|
|
|
193
190
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
194
191
|
}
|
|
195
192
|
},
|
|
196
|
-
render: (args) => {
|
|
197
|
-
const ref = React.useRef();
|
|
198
|
-
return <Header ref={ref} {...args} />;
|
|
199
|
-
},
|
|
193
|
+
render: (args) => <Header {...args} />,
|
|
200
194
|
};
|
|
201
195
|
|
|
202
196
|
export const DefaultWithPendingMessage = {
|
|
@@ -272,10 +266,7 @@ export const DefaultWithPendingMessage = {
|
|
|
272
266
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
273
267
|
}
|
|
274
268
|
},
|
|
275
|
-
render: (args) => {
|
|
276
|
-
const ref = React.useRef();
|
|
277
|
-
return <Header ref={ref} {...args} />;
|
|
278
|
-
},
|
|
269
|
+
render: (args) => <Header {...args} />,
|
|
279
270
|
};
|
|
280
271
|
|
|
281
272
|
export const DefaultWithPendingNotification = {
|
|
@@ -351,10 +342,7 @@ export const DefaultWithPendingNotification = {
|
|
|
351
342
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
352
343
|
}
|
|
353
344
|
},
|
|
354
|
-
render: (args) => {
|
|
355
|
-
const ref = React.useRef();
|
|
356
|
-
return <Header ref={ref} {...args} />;
|
|
357
|
-
},
|
|
345
|
+
render: (args) => <Header {...args} />,
|
|
358
346
|
};
|
|
359
347
|
|
|
360
348
|
export const DefaultWithEnterpriseInAnalysis = {
|
|
@@ -398,10 +386,7 @@ export const DefaultWithPendingNotification = {
|
|
|
398
386
|
onClickRemovePendingEnterprise: () => console.log('Remove pending enterprise clicked'),
|
|
399
387
|
}
|
|
400
388
|
},
|
|
401
|
-
render: (args) => {
|
|
402
|
-
const ref = React.useRef();
|
|
403
|
-
return <Header ref={ref} {...args} />;
|
|
404
|
-
},
|
|
389
|
+
render: (args) => <Header {...args} />,
|
|
405
390
|
};
|
|
406
391
|
|
|
407
392
|
export const DefaultWhiteTheme = {
|
|
@@ -432,14 +417,11 @@ export const DefaultWithPendingNotification = {
|
|
|
432
417
|
onClickRemovePendingEnterprise: () => console.log('Remove pending enterprise clicked'),
|
|
433
418
|
}
|
|
434
419
|
},
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
</View>
|
|
441
|
-
);
|
|
442
|
-
},
|
|
420
|
+
render: (args) => (
|
|
421
|
+
<View style={{ backgroundColor: '#fff', height: 76, overflow: 'hidden' }}>
|
|
422
|
+
<Header {...args} />
|
|
423
|
+
</View>
|
|
424
|
+
),
|
|
443
425
|
};
|
|
444
426
|
|
|
445
427
|
export const DefaultWithoutSwitchAccount = {
|
|
@@ -513,10 +495,7 @@ export const DefaultWithoutSwitchAccount = {
|
|
|
513
495
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
514
496
|
}
|
|
515
497
|
},
|
|
516
|
-
render: (args) => {
|
|
517
|
-
const ref = React.useRef();
|
|
518
|
-
return <Header ref={ref} {...args} />;
|
|
519
|
-
},
|
|
498
|
+
render: (args) => <Header {...args} />,
|
|
520
499
|
};
|
|
521
500
|
|
|
522
501
|
export const DefaultWithoutShortcut = {
|
|
@@ -590,10 +569,7 @@ export const DefaultWithoutShortcut = {
|
|
|
590
569
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
591
570
|
}
|
|
592
571
|
},
|
|
593
|
-
render: (args) => {
|
|
594
|
-
const ref = React.useRef();
|
|
595
|
-
return <Header ref={ref} {...args} />;
|
|
596
|
-
},
|
|
572
|
+
render: (args) => <Header {...args} />,
|
|
597
573
|
};
|
|
598
574
|
|
|
599
575
|
|
|
@@ -634,10 +610,7 @@ export const Navigation = {
|
|
|
634
610
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
635
611
|
}
|
|
636
612
|
},
|
|
637
|
-
render: (args) => {
|
|
638
|
-
const ref = React.useRef();
|
|
639
|
-
return <Header ref={ref} {...args} />;
|
|
640
|
-
},
|
|
613
|
+
render: (args) => <Header {...args} />,
|
|
641
614
|
};
|
|
642
615
|
|
|
643
616
|
export const NavigationWithDescription = {
|
|
@@ -662,10 +635,7 @@ export const NavigationWithDescription = {
|
|
|
662
635
|
onClickHome: () => console.log('Home clicked'),
|
|
663
636
|
}
|
|
664
637
|
},
|
|
665
|
-
render: (args) => {
|
|
666
|
-
const ref = React.useRef();
|
|
667
|
-
return <Header ref={ref} {...args} />;
|
|
668
|
-
},
|
|
638
|
+
render: (args) => <Header {...args} />,
|
|
669
639
|
};
|
|
670
640
|
|
|
671
641
|
export const NavigationMinimal = {
|
|
@@ -688,10 +658,7 @@ export const NavigationMinimal = {
|
|
|
688
658
|
onClickHome: () => console.log('Home clicked'),
|
|
689
659
|
}
|
|
690
660
|
},
|
|
691
|
-
render: (args) => {
|
|
692
|
-
const ref = React.useRef();
|
|
693
|
-
return <Header ref={ref} {...args} />;
|
|
694
|
-
},
|
|
661
|
+
render: (args) => <Header {...args} />,
|
|
695
662
|
};
|
|
696
663
|
|
|
697
664
|
export const NavigationWhite = {
|
|
@@ -715,10 +682,7 @@ export const NavigationWhite = {
|
|
|
715
682
|
onClickHome: () => console.log('Home clicked'),
|
|
716
683
|
}
|
|
717
684
|
},
|
|
718
|
-
render: (args) => {
|
|
719
|
-
const ref = React.useRef();
|
|
720
|
-
return <Header ref={ref} {...args} />;
|
|
721
|
-
},
|
|
685
|
+
render: (args) => <Header {...args} />,
|
|
722
686
|
};
|
|
723
687
|
|
|
724
688
|
export const NavigationWithDescriptionWhite = {
|
|
@@ -743,10 +707,7 @@ export const NavigationWithDescriptionWhite = {
|
|
|
743
707
|
onClickHome: () => console.log('Home clicked'),
|
|
744
708
|
}
|
|
745
709
|
},
|
|
746
|
-
render: (args) => {
|
|
747
|
-
const ref = React.useRef();
|
|
748
|
-
return <Header ref={ref} {...args} />;
|
|
749
|
-
},
|
|
710
|
+
render: (args) => <Header {...args} />,
|
|
750
711
|
};
|
|
751
712
|
|
|
752
713
|
export const NavigationMinimalWhite = {
|
|
@@ -769,10 +730,7 @@ export const NavigationMinimalWhite = {
|
|
|
769
730
|
onClickHome: () => console.log('Home clicked'),
|
|
770
731
|
}
|
|
771
732
|
},
|
|
772
|
-
render: (args) => {
|
|
773
|
-
const ref = React.useRef();
|
|
774
|
-
return <Header ref={ref} {...args} />;
|
|
775
|
-
},
|
|
733
|
+
render: (args) => <Header {...args} />,
|
|
776
734
|
};
|
|
777
735
|
|
|
778
736
|
export const User = {
|
|
@@ -819,10 +777,7 @@ export const User = {
|
|
|
819
777
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
820
778
|
}
|
|
821
779
|
},
|
|
822
|
-
render: (args) => {
|
|
823
|
-
const ref = React.useRef();
|
|
824
|
-
return <Header ref={ref} {...args} />;
|
|
825
|
-
},
|
|
780
|
+
render: (args) => <Header {...args} />,
|
|
826
781
|
};
|
|
827
782
|
|
|
828
783
|
export const OnlyAddEnterpriseNoShortcut = {
|
|
@@ -847,10 +802,7 @@ export const OnlyAddEnterpriseNoShortcut = {
|
|
|
847
802
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
848
803
|
}
|
|
849
804
|
},
|
|
850
|
-
render: (args) => {
|
|
851
|
-
const ref = React.useRef();
|
|
852
|
-
return <Header ref={ref} {...args} />;
|
|
853
|
-
},
|
|
805
|
+
render: (args) => <Header {...args} />,
|
|
854
806
|
};
|
|
855
807
|
|
|
856
808
|
export const WithManyEnterprises = {
|
|
@@ -939,10 +891,7 @@ export const WithManyEnterprises = {
|
|
|
939
891
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
940
892
|
}
|
|
941
893
|
},
|
|
942
|
-
render: (args) => {
|
|
943
|
-
const ref = React.useRef();
|
|
944
|
-
return <Header ref={ref} {...args} />;
|
|
945
|
-
},
|
|
894
|
+
render: (args) => <Header {...args} />,
|
|
946
895
|
parameters: {
|
|
947
896
|
docs: {
|
|
948
897
|
description: {
|
|
@@ -1048,10 +997,7 @@ export const ScrollableEnterprises = {
|
|
|
1048
997
|
onClickAddEnterprise: () => console.log('Add enterprise clicked'),
|
|
1049
998
|
}
|
|
1050
999
|
},
|
|
1051
|
-
render: (args) => {
|
|
1052
|
-
const ref = React.useRef();
|
|
1053
|
-
return <Header ref={ref} {...args} />;
|
|
1054
|
-
},
|
|
1000
|
+
render: (args) => <Header {...args} />,
|
|
1055
1001
|
parameters: {
|
|
1056
1002
|
docs: {
|
|
1057
1003
|
description: {
|
|
@@ -1059,4 +1005,4 @@ export const ScrollableEnterprises = {
|
|
|
1059
1005
|
},
|
|
1060
1006
|
},
|
|
1061
1007
|
},
|
|
1062
|
-
};
|
|
1008
|
+
};
|