@nextelco/common-ui 2.1.50 → 2.1.51
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.
|
@@ -27,6 +27,20 @@ export interface LayoutProps {
|
|
|
27
27
|
/** Quando este build foi feito, por baixo do logout. Ver Sidebar.deployedAt. */
|
|
28
28
|
deployedAt?: string | number | Date;
|
|
29
29
|
deployedAtLabel?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Estado inicial da sidebar (aberta/fechada). Sem isto mantém-se o comportamento de
|
|
32
|
+
* sempre: aberta no desktop, fechada em mobile. Passar isto serve para a app repor o
|
|
33
|
+
* que a pessoa tinha antes de recarregar a página (ex.: lido do seu próprio
|
|
34
|
+
* localStorage) — o Layout não persiste nada sozinho, tal como já acontece com `theme`.
|
|
35
|
+
*/
|
|
36
|
+
sidebarOpen?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Chamado sempre que a sidebar abre/fecha por uma ação da pessoa (o atalho da própria
|
|
39
|
+
* Sidebar, ou o botão de expandir em mobile) — nunca pelo ajuste automático ao
|
|
40
|
+
* redimensionar a janela, que não é uma escolha dela. Mesmo padrão de
|
|
41
|
+
* `onThemeChange`: o Layout só avisa, quem usa decide se e como guardar.
|
|
42
|
+
*/
|
|
43
|
+
onSidebarOpenChange?: (open: boolean) => void;
|
|
30
44
|
}
|
|
31
|
-
declare const Layout: ({ children, menus, groupLabels, appTitle, topBar, avatar, onLogout, logoutLabel, languages, currentLang, onLanguageChange, theme, onThemeChange, themeLabels, footer, deployedAt, deployedAtLabel, }: LayoutProps) => React.JSX.Element;
|
|
45
|
+
declare const Layout: ({ children, menus, groupLabels, appTitle, topBar, avatar, onLogout, logoutLabel, languages, currentLang, onLanguageChange, theme, onThemeChange, themeLabels, footer, deployedAt, deployedAtLabel, sidebarOpen: sidebarOpenProp, onSidebarOpenChange, }: LayoutProps) => React.JSX.Element;
|
|
32
46
|
export default Layout;
|