tharaday 0.5.2 → 0.5.3

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.
@@ -122,56 +122,3 @@ export const LoggedOut: Story = {
122
122
  activeNavId: 'home',
123
123
  },
124
124
  };
125
-
126
- export const HeaderOnly: Story = {
127
- args: {
128
- headerTitle: 'Header Only',
129
- headerLogo: logo,
130
- user: { name: 'John Doe' },
131
- navItems: [],
132
- children: (
133
- <Box padding={8} textAlign="center">
134
- <Text variant="h2">Layout with Header only</Text>
135
- <Text variant="body-md">NavBar is hidden because navItems is empty.</Text>
136
- </Box>
137
- ),
138
- },
139
- };
140
-
141
- export const NavBarOnly: Story = {
142
- args: {
143
- headerTitle: '',
144
- headerLogo: undefined,
145
- user: undefined,
146
- onLogin: undefined,
147
- onLogout: undefined,
148
- onCreateAccount: undefined,
149
- navItems,
150
- children: (
151
- <Box padding={8} textAlign="center">
152
- <Text variant="h2">Layout with NavBar only</Text>
153
- <Text variant="body-md">
154
- Header is hidden because no branding or user props are provided.
155
- </Text>
156
- </Box>
157
- ),
158
- },
159
- };
160
-
161
- export const ContentOnly: Story = {
162
- args: {
163
- headerTitle: '',
164
- headerLogo: undefined,
165
- user: undefined,
166
- onLogin: undefined,
167
- onLogout: undefined,
168
- onCreateAccount: undefined,
169
- navItems: [],
170
- children: (
171
- <Box padding={8} textAlign="center" border backgroundColor="subtle">
172
- <Text variant="h2">Layout with Content only</Text>
173
- <Text variant="body-md">Both Header and NavBar are hidden.</Text>
174
- </Box>
175
- ),
176
- },
177
- };
@@ -26,38 +26,24 @@ export const AppLayout = ({
26
26
  className,
27
27
  maxWidth,
28
28
  }: AppLayoutProps) => {
29
- const showHeader = !!(
30
- headerLogo ||
31
- headerTitle ||
32
- user ||
33
- onLogin ||
34
- onLogout ||
35
- onCreateAccount
36
- );
37
- const showNavBar = !!(navItems?.length || navActions);
38
-
39
29
  return (
40
30
  <div className={clsx(styles.root, className)}>
41
- {showHeader && (
42
- <Header
43
- logo={headerLogo}
44
- title={headerTitle}
45
- user={user}
46
- onLogin={onLogin}
47
- onLogout={onLogout}
48
- onCreateAccount={onCreateAccount}
49
- maxWidth={maxWidth}
50
- />
51
- )}
52
- {showNavBar && (
53
- <NavBar
54
- items={navItems}
55
- activeId={activeNavId}
56
- actions={navActions}
57
- onItemClick={onNavItemClick}
58
- maxWidth={maxWidth}
59
- />
60
- )}
31
+ <Header
32
+ logo={headerLogo}
33
+ title={headerTitle}
34
+ user={user}
35
+ onLogin={onLogin}
36
+ onLogout={onLogout}
37
+ onCreateAccount={onCreateAccount}
38
+ maxWidth={maxWidth}
39
+ />
40
+ <NavBar
41
+ items={navItems}
42
+ activeId={activeNavId}
43
+ actions={navActions}
44
+ onItemClick={onNavItemClick}
45
+ maxWidth={maxWidth}
46
+ />
61
47
  <main className={styles.main}>
62
48
  <div className={styles.container}>{children}</div>
63
49
  </main>