@servicetitan/navigation 12.0.0 → 12.0.2

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.
Files changed (25) hide show
  1. package/dist/components/titan-layout/layout-header-dark.d.ts.map +1 -1
  2. package/dist/components/titan-layout/layout-header-dark.js +32 -20
  3. package/dist/components/titan-layout/layout-header-dark.js.map +1 -1
  4. package/dist/components/titan-layout/layout-header-links-internal.d.ts +10 -0
  5. package/dist/components/titan-layout/layout-header-links-internal.d.ts.map +1 -0
  6. package/dist/components/titan-layout/layout-header-links-internal.js +75 -0
  7. package/dist/components/titan-layout/layout-header-links-internal.js.map +1 -0
  8. package/dist/components/titan-layout/layout-header-links.d.ts.map +1 -1
  9. package/dist/components/titan-layout/layout-header-links.js +10 -71
  10. package/dist/components/titan-layout/layout-header-links.js.map +1 -1
  11. package/dist/components/titan-layout/layout-header.module.less +70 -67
  12. package/dist/components/titan-layout/layout-header.module.less.d.ts +1 -0
  13. package/dist/components/titan-layout/titan-layout.stories.d.ts +1 -0
  14. package/dist/components/titan-layout/titan-layout.stories.d.ts.map +1 -1
  15. package/dist/components/titan-layout/with-tooltip.d.ts +1 -1
  16. package/dist/components/titan-layout/with-tooltip.d.ts.map +1 -1
  17. package/dist/components/titan-layout/with-tooltip.js.map +1 -1
  18. package/package.json +2 -2
  19. package/src/components/titan-layout/layout-header-dark.tsx +42 -20
  20. package/src/components/titan-layout/layout-header-links-internal.tsx +151 -0
  21. package/src/components/titan-layout/layout-header-links.tsx +9 -128
  22. package/src/components/titan-layout/layout-header.module.less +70 -67
  23. package/src/components/titan-layout/layout-header.module.less.d.ts +1 -0
  24. package/src/components/titan-layout/titan-layout.stories.tsx +14 -0
  25. package/src/components/titan-layout/with-tooltip.tsx +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servicetitan/navigation",
3
- "version": "12.0.0",
3
+ "version": "12.0.2",
4
4
  "description": "Navigation components",
5
5
  "repository": {
6
6
  "type": "git",
@@ -42,5 +42,5 @@
42
42
  "less": true,
43
43
  "webpack": false
44
44
  },
45
- "gitHead": "7dcd2ea3b19aa633f1cc2204060dfa25895b37a1"
45
+ "gitHead": "037d391733c6dd61d96503860e6090881cface0b"
46
46
  }
@@ -1,10 +1,12 @@
1
- import { ButtonCompound, Icon, Menu } from '@servicetitan/anvil2';
1
+ import { ButtonCompound, Icon, Menu, MenuProps } from '@servicetitan/anvil2';
2
2
  import SvgMoreVert from '@servicetitan/anvil2/assets/icons/material/round/more_vert.svg';
3
3
  import classNames from 'classnames';
4
4
  import { FC, useCallback, useEffect, useRef, useState } from 'react';
5
5
  import { NavigationItemData } from '../../utils/navigation';
6
+ import { NavigationComponentProps } from './interface-internal';
7
+ import { useTitanLayoutContext } from './layout-context';
6
8
  import { LayoutHeader, LayoutHeaderProps } from './layout-header';
7
- import { LayoutHeaderNavigationLink } from './layout-header-links';
9
+ import { InternalLayoutHeaderNavigationLink } from './layout-header-links-internal';
8
10
  import * as Styles from './layout-header.module.less';
9
11
  import { withTooltip } from './with-tooltip';
10
12
 
@@ -107,6 +109,7 @@ const LayoutHeaderNav: FC<LayoutHeaderNavProps> = ({ className, mainItems, overf
107
109
  const navigationRef = useRef<HTMLDivElement>(null);
108
110
  const forceUpdate = useForceUpdate();
109
111
  const [minimized, setMinimized] = useState(MinimizedState.Calculating);
112
+ const { NavigationComponent } = useTitanLayoutContext();
110
113
 
111
114
  useEffect(() => {
112
115
  const handleResize = () => {
@@ -120,7 +123,8 @@ const LayoutHeaderNav: FC<LayoutHeaderNavProps> = ({ className, mainItems, overf
120
123
 
121
124
  const updateIsMinimized = () => {
122
125
  if (containerRef.current && navigationRef.current) {
123
- if (navigationRef.current.clientWidth + 16 > containerRef.current.clientWidth) {
126
+ const widthGap = 16 + (overflowItems?.length ? 32 : 0);
127
+ if (navigationRef.current.clientWidth + widthGap > containerRef.current.clientWidth) {
124
128
  setMinimized(MinimizedState.Minimized);
125
129
  } else if (minimized === MinimizedState.Calculating) {
126
130
  setMinimized(MinimizedState.Full);
@@ -150,37 +154,55 @@ const LayoutHeaderNav: FC<LayoutHeaderNavProps> = ({ className, mainItems, overf
150
154
  <div ref={navigationRef} className={classNames(Styles.headerNavigation)}>
151
155
  {mainItems?.map(item =>
152
156
  withTooltip(
153
- <LayoutHeaderNavigationLink
157
+ <InternalLayoutHeaderNavigationLink
154
158
  {...item}
155
159
  label={isMinimized ? undefined : item.title}
156
160
  key={item.id}
161
+ navigationComponent={NavigationComponent}
157
162
  />,
158
163
  isMinimized ? item.title : undefined,
159
164
  { key: item.id }
160
165
  )
161
166
  )}
162
167
  </div>
163
- {!!overflowItems?.length && <LayoutHeaderNavOverflow items={overflowItems} />}
168
+ {!!overflowItems?.length && (
169
+ <LayoutHeaderNavOverflow
170
+ items={overflowItems}
171
+ navigationComponent={NavigationComponent}
172
+ />
173
+ )}
164
174
  </div>
165
175
  );
166
176
  };
167
177
 
168
- const LayoutHeaderNavOverflow: FC<{
169
- items: NavigationItemData[];
170
- }> = ({ items }) => {
178
+ const LayoutHeaderNavOverflowTrigger: MenuProps['trigger'] = props => (
179
+ <ButtonCompound
180
+ {...props}
181
+ className={Styles.headerNavigationOverflowTrigger}
182
+ data-cy="navigation-overflow-trigger"
183
+ >
184
+ <Icon svg={SvgMoreVert} size="medium" />
185
+ </ButtonCompound>
186
+ );
187
+
188
+ const LayoutHeaderNavOverflow: FC<
189
+ {
190
+ items: NavigationItemData[];
191
+ } & NavigationComponentProps
192
+ > = ({ items, navigationComponent }) => {
171
193
  return (
172
- <Menu
173
- trigger={props => (
174
- <ButtonCompound {...props} className={Styles.headerNavigationOverflowTrigger}>
175
- <Icon svg={SvgMoreVert} size="medium" />
176
- </ButtonCompound>
177
- )}
178
- contentClassName={Styles.headerNavigationOverflow}
179
- placement="bottom-end"
180
- >
181
- {items.map(item => (
182
- <LayoutHeaderNavigationLink {...item} label={item.title} key={item.id} />
183
- ))}
194
+ <Menu trigger={LayoutHeaderNavOverflowTrigger} placement="bottom-end">
195
+ <div data-cy="navigation-overflow-content" className={Styles.headerNavigationOverflow}>
196
+ {items.map(item => (
197
+ <InternalLayoutHeaderNavigationLink
198
+ {...item}
199
+ label={item.title}
200
+ key={item.id}
201
+ navigationComponent={navigationComponent}
202
+ isOverflow
203
+ />
204
+ ))}
205
+ </div>
184
206
  </Menu>
185
207
  );
186
208
  };
@@ -0,0 +1,151 @@
1
+ import { Icon, IconProps } from '@servicetitan/anvil2';
2
+ import classNames from 'classnames';
3
+ import { FC, Fragment } from 'react';
4
+ import {
5
+ HeaderNavigationLinkProps,
6
+ HeaderNavigationTriggerProps,
7
+ } from '../../utils/navigation-legacy';
8
+ import { getCounterTag } from '../../utils/side-nav';
9
+ import { CounterTag, CounterTagProps } from '../counter-tag';
10
+ // use v1 tooltips due to bug with v2 in monolith
11
+ import { NavigationComponentProps } from './interface-internal';
12
+ import * as Styles from './layout-header.module.less';
13
+
14
+ /** Content for navigation items */
15
+ const InternalHeaderNavigationItemContent: FC<{
16
+ tag?: CounterTagProps;
17
+ counterClassName?: string;
18
+ icon: IconProps['svg'] | undefined;
19
+ iconActive?: IconProps['svg'];
20
+ label?: string;
21
+ labelClassName?: string;
22
+ }> = ({ counterClassName, icon, iconActive, label, labelClassName, tag }) => {
23
+ return (
24
+ <Fragment>
25
+ {!!icon && <Icon svg={icon} className={Styles.navigationIcon} />}
26
+ {!!iconActive && (
27
+ <Icon
28
+ svg={iconActive}
29
+ className={classNames(Styles.navigationIcon, Styles.navigationIconActive)}
30
+ />
31
+ )}
32
+
33
+ {!!label && (
34
+ <span
35
+ className={classNames(Styles.navigationItemLabel, labelClassName)}
36
+ data-cy="nav-item-label"
37
+ >
38
+ {label}
39
+ </span>
40
+ )}
41
+
42
+ {!!tag && (
43
+ <CounterTag
44
+ data={tag}
45
+ className={classNames(Styles.navigationItemCounter, counterClassName)}
46
+ longClassName={Styles.navigationItemCounterLong}
47
+ />
48
+ )}
49
+ </Fragment>
50
+ );
51
+ };
52
+
53
+ /** Navigation extra item with link */
54
+ export const InternalLayoutHeaderNavigationLink: FC<
55
+ HeaderNavigationLinkProps & NavigationComponentProps & { isOverflow?: boolean }
56
+ > = ({
57
+ id,
58
+ to,
59
+ hint,
60
+ tooltip,
61
+ className,
62
+ counter,
63
+ icon,
64
+ iconActive,
65
+ iconClassName,
66
+ iconName,
67
+ iconComponent,
68
+ isActive,
69
+ isOverflow,
70
+ label,
71
+ labelClassName,
72
+ tag,
73
+ target,
74
+ title,
75
+ navigationComponent: NavigationComponent,
76
+ ...rest
77
+ }) => {
78
+ return (
79
+ <NavigationComponent
80
+ data-cy={`navigation-item-${id}`}
81
+ data-pendo={`navigation-item-${id}`}
82
+ {...rest}
83
+ key={id}
84
+ to={to}
85
+ className={classNames(
86
+ isOverflow ? Styles.navigationLinkOverflow : Styles.navigationLink,
87
+ className,
88
+ {
89
+ [Styles.navigationItemActive]: isActive === true,
90
+ [Styles.navigationItemIconState]: !!icon && !!iconActive,
91
+ }
92
+ )}
93
+ isActive={typeof isActive === 'function' ? isActive : undefined}
94
+ activeClassName={Styles.navigationItemActive}
95
+ target={target}
96
+ >
97
+ <InternalHeaderNavigationItemContent
98
+ tag={getCounterTag(counter, tag)}
99
+ icon={icon}
100
+ iconActive={iconActive}
101
+ label={label}
102
+ labelClassName={labelClassName}
103
+ />
104
+ </NavigationComponent>
105
+ );
106
+ };
107
+
108
+ /** Navigation extra item with icon button */
109
+ export const InternalLayoutHeaderNavigationTrigger: FC<HeaderNavigationTriggerProps> = ({
110
+ id,
111
+ className,
112
+ counter,
113
+ icon,
114
+ iconActive,
115
+ iconName,
116
+ isActive,
117
+ hint,
118
+ label,
119
+ labelClassName,
120
+ tag,
121
+ tooltip,
122
+ title,
123
+ titleClassName,
124
+ ...rest
125
+ }) => {
126
+ return (
127
+ <div
128
+ data-cy={`navigation-trigger-${id}`}
129
+ data-pendo={`navigation-trigger-${id}`}
130
+ {...rest}
131
+ title={hint}
132
+ className={classNames(
133
+ Styles.navigationLink,
134
+ {
135
+ [Styles.navigationItemActive]: isActive === true,
136
+ [Styles.navigationItemIconState]: !!icon && !!iconActive,
137
+ },
138
+ 'cursor-pointer',
139
+ className
140
+ )}
141
+ >
142
+ <InternalHeaderNavigationItemContent
143
+ tag={getCounterTag(counter, tag)}
144
+ icon={icon}
145
+ iconActive={iconActive}
146
+ label={label}
147
+ labelClassName={labelClassName}
148
+ />
149
+ </div>
150
+ );
151
+ };
@@ -1,148 +1,29 @@
1
- import { Icon, IconProps } from '@servicetitan/anvil2';
2
- import classNames from 'classnames';
3
- import { FC, Fragment } from 'react';
1
+ import { FC } from 'react';
4
2
  import {
5
3
  HeaderNavigationLinkProps,
6
4
  HeaderNavigationTriggerProps,
7
5
  } from '../../utils/navigation-legacy';
8
- import { getCounterTag } from '../../utils/side-nav';
9
- import { CounterTag, CounterTagProps } from '../counter-tag';
10
- // use v1 tooltips due to bug with v2 in monolith
11
- import { withTooltip } from '../header-navigation/with-tooltip';
12
6
  import { useTitanLayoutContext } from './layout-context';
13
- import * as Styles from './layout-header.module.less';
14
-
15
- /** Content for navigation items */
16
- const HeaderNavigationItemContent: FC<{
17
- tag?: CounterTagProps;
18
- counterClassName?: string;
19
- icon: IconProps['svg'] | undefined;
20
- iconActive?: IconProps['svg'];
21
- label?: string;
22
- labelClassName?: string;
23
- }> = ({ counterClassName, icon, iconActive, label, labelClassName, tag }) => {
24
- return (
25
- <Fragment>
26
- {!!icon && <Icon svg={icon} className={Styles.navigationIcon} />}
27
- {!!iconActive && (
28
- <Icon
29
- svg={iconActive}
30
- className={classNames(Styles.navigationIcon, Styles.navigationIconActive)}
31
- />
32
- )}
33
-
34
- {!!label && (
35
- <span
36
- className={classNames(Styles.navigationItemLabel, labelClassName)}
37
- data-cy="nav-item-label"
38
- >
39
- {label}
40
- </span>
41
- )}
42
-
43
- {!!tag && (
44
- <CounterTag
45
- data={tag}
46
- className={classNames(Styles.navigationItemCounter, counterClassName)}
47
- longClassName={Styles.navigationItemCounterLong}
48
- />
49
- )}
50
- </Fragment>
51
- );
52
- };
7
+ import {
8
+ InternalLayoutHeaderNavigationLink,
9
+ InternalLayoutHeaderNavigationTrigger,
10
+ } from './layout-header-links-internal';
11
+ import { withTooltip } from './with-tooltip';
53
12
 
54
13
  /** Navigation extra item with link */
55
- export const LayoutHeaderNavigationLink: FC<HeaderNavigationLinkProps> = ({
56
- id,
57
- to,
58
- hint,
59
- tooltip,
60
- className,
61
- counter,
62
- icon,
63
- iconActive,
64
- iconClassName,
65
- iconComponent,
66
- iconName,
67
- isActive,
68
- label,
69
- labelClassName,
70
- tag,
71
- target,
72
- title,
73
- ...rest
74
- }) => {
14
+ export const LayoutHeaderNavigationLink: FC<HeaderNavigationLinkProps> = ({ tooltip, ...rest }) => {
75
15
  const { NavigationComponent } = useTitanLayoutContext();
76
16
 
77
17
  return withTooltip(
78
- <NavigationComponent
79
- data-cy={`navigation-item-${id}`}
80
- data-pendo={`navigation-item-${id}`}
81
- {...rest}
82
- key={id}
83
- to={to}
84
- className={classNames(Styles.navigationLink, className, {
85
- [Styles.navigationItemActive]: isActive === true,
86
- [Styles.navigationItemIconState]: !!icon && !!iconActive,
87
- })}
88
- isActive={typeof isActive === 'function' ? isActive : undefined}
89
- activeClassName={Styles.navigationItemActive}
90
- target={target}
91
- >
92
- <HeaderNavigationItemContent
93
- tag={getCounterTag(counter, tag)}
94
- icon={icon}
95
- iconActive={iconActive}
96
- label={label}
97
- labelClassName={labelClassName}
98
- />
99
- </NavigationComponent>,
18
+ <InternalLayoutHeaderNavigationLink {...rest} navigationComponent={NavigationComponent} />,
100
19
  tooltip
101
20
  );
102
21
  };
103
22
 
104
23
  /** Navigation extra item with icon button */
105
24
  export const LayoutHeaderNavigationTrigger: FC<HeaderNavigationTriggerProps> = ({
106
- id,
107
- className,
108
- counter,
109
- icon,
110
- iconActive,
111
- iconName,
112
- isActive,
113
- hint,
114
- label,
115
- labelClassName,
116
- tag,
117
25
  tooltip,
118
- title,
119
- titleClassName,
120
26
  ...rest
121
27
  }) => {
122
- return withTooltip(
123
- <div
124
- data-cy={`navigation-trigger-${id}`}
125
- data-pendo={`navigation-trigger-${id}`}
126
- {...rest}
127
- title={hint}
128
- className={classNames(
129
- Styles.navigationLink,
130
- {
131
- [Styles.navigationItemActive]: isActive === true,
132
- [Styles.navigationItemIconState]: !!icon && !!iconActive,
133
- },
134
- 'cursor-pointer',
135
- className
136
- )}
137
- >
138
- <HeaderNavigationItemContent
139
- tag={getCounterTag(counter, tag)}
140
- icon={icon}
141
- iconActive={iconActive}
142
- label={label}
143
- labelClassName={labelClassName}
144
- />
145
- </div>,
146
- tooltip
147
- );
28
+ return withTooltip(<InternalLayoutHeaderNavigationTrigger {...rest} />, tooltip);
148
29
  };
@@ -41,10 +41,6 @@
41
41
  }
42
42
 
43
43
  .he-top-right {
44
- & > * {
45
- color: var(--nav-top-text-color);
46
- }
47
-
48
44
  .he-top-right-text {
49
45
  font-size: @typescale-2;
50
46
  font-weight: @font-weight-bold;
@@ -122,14 +118,15 @@
122
118
  min-width: 0;
123
119
  overflow-x: auto;
124
120
  overflow-y: hidden;
121
+ flex: 1;
125
122
 
126
123
  display: flex;
127
124
  justify-content: center;
128
125
  align-items: center;
129
126
 
130
127
  &.calculating {
131
- .header-navigation {
132
- opacity: 0;
128
+ > * {
129
+ opacity: 0 !important;
133
130
  }
134
131
  }
135
132
 
@@ -237,7 +234,8 @@
237
234
  }
238
235
 
239
236
  //!!!!!!!!!!!!!!! nav links styles !!!!!!!!!!!!!!!//
240
- .navigation-link {
237
+ .navigation-link,
238
+ .navigation-link-overflow {
241
239
  &.navigation-item-icon-state.navigation-item-active {
242
240
  .navigation-icon[data-anv][data-anv]:not(.navigation-icon-active) {
243
241
  display: none;
@@ -276,34 +274,34 @@
276
274
 
277
275
  border-radius: 12px;
278
276
  font-size: @size-links-tiny;
279
- }
280
-
281
- .navigation-item-counter {
282
- color: @color-white;
283
- font-weight: @font-weight-semibold;
284
- font-size: 8px !important;
285
- min-width: 16px !important;
286
- height: 16px !important;
287
- position: absolute;
288
- top: 4px;
289
- right: -2px;
290
277
 
291
- &.navigation-item-counter-long {
292
- right: -8px;
278
+ .navigation-item-counter {
279
+ color: @color-white;
280
+ font-weight: @font-weight-semibold;
281
+ font-size: 8px !important;
282
+ min-width: 16px !important;
283
+ height: 16px !important;
284
+ position: absolute;
285
+ top: 4px;
286
+ right: -2px;
287
+
288
+ &.navigation-item-counter-long {
289
+ right: -8px;
290
+ }
293
291
  }
294
- }
295
292
 
296
- .navigation-item-label {
297
- color: inherit;
298
- font-size: @typescale-1;
299
- font-family: @base-font-family;
300
- font-weight: @font-weight-semibold;
301
- margin-left: @spacing-half;
302
- }
293
+ .navigation-item-label {
294
+ color: inherit;
295
+ font-size: @typescale-1;
296
+ font-family: @base-font-family;
297
+ font-weight: @font-weight-semibold;
298
+ margin-left: @spacing-half;
299
+ }
303
300
 
304
- .navigation-icon[data-anv][data-anv] {
305
- height: 24px;
306
- width: 24px;
301
+ .navigation-icon[data-anv][data-anv] {
302
+ height: 24px;
303
+ width: 24px;
304
+ }
307
305
  }
308
306
 
309
307
  &.header-desktop {
@@ -339,7 +337,7 @@
339
337
  }
340
338
 
341
339
  .header-dark .navigation-link,
342
- .header-navigation > .navigation-link {
340
+ .header-navigation .navigation-link {
343
341
  &.navigation-item-active {
344
342
  color: @color-blue-200 !important;
345
343
  }
@@ -401,47 +399,52 @@
401
399
  }
402
400
  }
403
401
 
404
- .header-navigation-overflow .navigation-link {
405
- display: inline-flex;
406
- color: @color-black;
407
- padding: @spacing-1 12px;
408
- cursor: pointer;
409
-
410
- font-family: @base-font-family;
411
- font-size: @typescale-4;
412
- position: relative;
413
- align-items: center;
414
- flex-wrap: nowrap;
415
- text-wrap: nowrap;
402
+ .header-navigation-overflow {
403
+ display: flex;
404
+ flex-direction: column;
416
405
 
417
406
  margin-left: -0.5rem;
418
407
  margin-right: -0.5rem;
419
408
 
420
- &:hover {
421
- background-color: @color-blue-500;
422
- color: @color-white;
423
- }
424
-
425
- &.navigation-item-active:not(:hover) {
426
- color: @color-blue;
427
- }
409
+ .navigation-link-overflow {
410
+ display: inline-flex;
411
+ color: @color-black;
412
+ padding: @spacing-1 12px;
413
+ cursor: pointer;
428
414
 
429
- .navigation-item-label {
430
415
  font-family: @base-font-family;
431
- font-size: @typescale-2;
432
- margin-left: @spacing-half;
433
- }
434
- .navigation-item-counter {
435
- color: @color-white;
436
- font-weight: @font-weight-semibold;
437
- font-size: 8px !important;
416
+ font-size: @typescale-4;
417
+ position: relative;
418
+ align-items: center;
419
+ flex-wrap: nowrap;
420
+ text-wrap: nowrap;
438
421
 
439
- min-width: 12px !important;
440
- height: 12px !important;
441
- margin-left: @spacing-half;
442
- margin-top: -@spacing-1;
443
- }
444
- .navigation-icon[data-anv][data-anv] {
445
- height: 20px;
422
+ &:hover {
423
+ background-color: @color-blue-500;
424
+ color: @color-white;
425
+ }
426
+
427
+ &.navigation-item-active:not(:hover) {
428
+ color: @color-blue;
429
+ }
430
+
431
+ .navigation-item-label {
432
+ font-family: @base-font-family;
433
+ font-size: @typescale-2;
434
+ margin-left: @spacing-half;
435
+ }
436
+ .navigation-item-counter {
437
+ color: @color-white;
438
+ font-weight: @font-weight-semibold;
439
+ font-size: 8px !important;
440
+ margin-right: @spacing-half;
441
+ margin-left: @spacing-half;
442
+
443
+ min-width: 12px !important;
444
+ height: 12px !important;
445
+ }
446
+ .navigation-icon[data-anv][data-anv] {
447
+ height: 20px;
448
+ }
446
449
  }
447
450
  }
@@ -32,4 +32,5 @@ export const navigationItemCounterLong: string;
32
32
  export const navigationItemIconState: string;
33
33
  export const navigationItemLabel: string;
34
34
  export const navigationLink: string;
35
+ export const navigationLinkOverflow: string;
35
36
 
@@ -365,6 +365,20 @@ export const TitanLayoutAnvil1TopNav = (args: LayoutContentArgs) => (
365
365
  );
366
366
 
367
367
  export const TitanLayoutAnvil1Top = (args: LayoutContentArgs) => (
368
+ <TitanLayout
369
+ {...useLayoutProps(args)}
370
+ appearance="anvil1"
371
+ navVariant="top"
372
+ top={undefined}
373
+ navigationOverflowItems={undefined}
374
+ >
375
+ <Anvil1Page>
376
+ <Content {...args} />
377
+ </Anvil1Page>
378
+ </TitanLayout>
379
+ );
380
+
381
+ export const TitanLayoutAnvil1TopOverflow = (args: LayoutContentArgs) => (
368
382
  <TitanLayout {...useLayoutProps(args)} appearance="anvil1" navVariant="top" top={undefined}>
369
383
  <Anvil1Page>
370
384
  <Content {...args} />
@@ -4,7 +4,7 @@ import { ReactElement } from 'react';
4
4
  export const withTooltip = (
5
5
  element: ReactElement,
6
6
  tooltip: string | undefined,
7
- props: {
7
+ props?: {
8
8
  placement?: TooltipProps['placement'];
9
9
  key?: string;
10
10
  }