Skip to content

Commit

Permalink
Enhance focus trap story
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Jan 23, 2024
1 parent f35683b commit 26b9026
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/components/focus_trap/focus_trap.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
* Side Public License, v 1.
*/

import type { Meta, StoryObj } from '@storybook/react';
import React, { useState } from 'react';
import type { Meta, StoryObj } from '@storybook/react';
import { hideStorybookControls } from '../../../.storybook/utils';

import { EuiButton } from '../button';
import { EuiFieldText } from '../form';
Expand All @@ -23,6 +24,18 @@ const meta: Meta<EuiFocusTrapProps> = {
component: EuiFocusTrap,
argTypes: {
returnFocus: { type: 'boolean' },
...hideStorybookControls(['style']),
},
args: {
// Component defaults
clickOutsideDisables: false,
closeOnMouseup: false,
crossFrame: false,
disabled: false,
gapMode: 'padding',
noIsolation: true,
returnFocus: true,
scrollLock: false,
},
};

Expand Down

0 comments on commit 26b9026

Please sign in to comment.