Skip to content

Commit dcaee9b

Browse files
committed
docs: update Tooltip + TooltipModal story with fallbackPlacements
1 parent 8753da9 commit dcaee9b

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

packages/modals/demo/stories/TooltipDialogStory.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ export const TooltipDialogStory: Story<IArgs> = ({
9090
{!!hasClose && <TooltipDialog.Close aria-label={closeAriaLabel} />}
9191
</TooltipDialog>
9292
<Grid>
93-
<Grid.Row style={{ height: 'calc(100vh - 80px)' }}>
93+
<Grid.Row style={{ height: 'calc(100vh - 200px)' }}>
9494
{[...Array(count)].map((_, index) => (
9595
<Grid.Col key={index} md={4} textAlign="center" alignSelf="center">
9696
<IconButton

packages/modals/demo/tooltipDialog.stories.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { useArgs } from '@storybook/client-api';
33
import { TooltipDialog } from '@zendeskgarden/react-modals';
44
import { TooltipDialogStory } from './stories/TooltipDialogStory';
55
import { TOOLTIP_DIALOG_BODY as BODY } from './stories/data';
6+
import { PLACEMENT } from '../src/types';
67
import README from '../README.md';
78

89
<Meta
@@ -41,6 +42,7 @@ import README from '../README.md';
4142
}}
4243
argTypes={{
4344
referenceElement: { control: false },
45+
fallbackPlacements: { control: 'multi-select', options: PLACEMENT.filter(p => p !== 'auto') },
4446
hasBody: { name: 'TooltipDialog.Body', table: { category: 'Story' } },
4547
hasClose: { name: 'TooltipDialog.Close', table: { category: 'Story' } },
4648
hasFooter: { name: 'TooltipDialog.Footer', table: { category: 'Story' } },

packages/tooltips/demo/stories/TooltipStory.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface IArgs extends Omit<ITooltipProps, 'content'> {
1818

1919
export const TooltipStory: StoryFn<IArgs> = ({ content, ...args }: IArgs) => (
2020
<Grid>
21-
<Grid.Row style={{ height: 'calc(100vh - 80px)' }}>
21+
<Grid.Row style={{ height: 'calc(100vh - 200px)' }}>
2222
<Grid.Col textAlign="center" alignSelf="center">
2323
<Tooltip
2424
{...args}

packages/tooltips/demo/tooltip.stories.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Tooltip, Title, Paragraph } from '@zendeskgarden/react-tooltips';
33
import { TooltipStory } from './stories/TooltipStory';
44
import { TOOLTIP_CONTENT as CONTENT } from './stories/data';
55
import README from '../README.md';
6+
import { PLACEMENT } from '../src/types';
67

78
<Meta
89
title="Packages/Tooltips/Tooltip"
@@ -29,7 +30,8 @@ import README from '../README.md';
2930
}}
3031
argTypes={{
3132
isVisible: { control: 'boolean' },
32-
appendToNode: { control: false }
33+
appendToNode: { control: false },
34+
fallbackPlacements: { control: 'multi-select', options: PLACEMENT.filter(p => p !== 'auto') }
3335
}}
3436
parameters={{
3537
design: {

0 commit comments

Comments
 (0)