Skip to content

Commit

Permalink
fix stories
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsnes committed Jun 19, 2024
1 parent cd39458 commit e58d1e8
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 35 deletions.
6 changes: 1 addition & 5 deletions packages/react/src/components/Modal/Modal.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import { useRef, useState } from 'react';
import type { Meta, StoryFn } from '@storybook/react';

import { Button } from '../Button';
import { Textfield } from '../form/Textfield';
import { Paragraph } from '../Typography';
import { Divider } from '../Divider';
import { Combobox } from '..';
import { Combobox, Divider, Paragraph, Textfield, Button } from '..';

import { Modal } from '.';

Expand Down
62 changes: 32 additions & 30 deletions packages/react/src/components/form/Combobox/Combobox.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,36 +290,38 @@ export const InModal: StoryFn<typeof Combobox> = (args) => {
>
Open Modal
</Button>
<Modal
ref={modalRef}
style={{
overflow: 'visible',
}}
>
<Modal.Header>Combobox i Modal</Modal.Header>
<Modal.Content>
<Combobox
{...args}
value={value}
multiple={true}
onValueChange={(value) => {
setValue(value);
}}
label='Hvor går reisen?'
portal={false}
>
<Combobox.Empty>Fant ingen treff</Combobox.Empty>
{PLACES.map((item, index) => (
<Combobox.Option
key={index}
value={item.value}
>
{item.name}
</Combobox.Option>
))}
</Combobox>
</Modal.Content>
</Modal>
<Modal.Root>
<Modal.Dialog
ref={modalRef}
style={{
overflow: 'visible',
}}
>
<Modal.Header>Combobox i Modal</Modal.Header>
<Modal.Content>
<Combobox
{...args}
value={value}
multiple={true}
onValueChange={(value) => {
setValue(value);
}}
label='Hvor går reisen?'
portal={false}
>
<Combobox.Empty>Fant ingen treff</Combobox.Empty>
{PLACES.map((item, index) => (
<Combobox.Option
key={index}
value={item.value}
>
{item.name}
</Combobox.Option>
))}
</Combobox>
</Modal.Content>
</Modal.Dialog>
</Modal.Root>
</>
);
};
Expand Down

0 comments on commit e58d1e8

Please sign in to comment.