Skip to content

Commit

Permalink
docs(person-select): adding a console.log to select event in storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
eikeland committed Jan 15, 2024
1 parent 08954d4 commit f2f262c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions storybook/stories/person/person-select.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ifDefined } from 'lit/directives/if-defined.js';

import type { Meta, StoryObj } from '@storybook/web-components';
import { setCustomElementsManifest } from '@storybook/web-components';
import PersonSelect, { PersonSelectElementProps } from '@equinor/fusion-wc-person/select';
import PersonSelect, { PersonSelectElementProps, PersonSelectEvent } from '@equinor/fusion-wc-person/select';
import cem from '@equinor/fusion-wc-person/custom-elements.json';

import { faker } from '@faker-js/faker';
Expand All @@ -26,7 +26,8 @@ const meta: Meta<typeof cem> = {
const render = (props: PersonSelectElementProps) =>
html`
<div style="min-height: 300px">
<fwc-person-select autofocus=${ifDefined(props.autofocus)}></fwc-person-avatar>
<fwc-person-select autofocus=${ifDefined(props.autofocus)} @select=${(e: PersonSelectEvent) =>
console.log('PersonSelectEvent', e)}></fwc-person-avatar>
</div>
`;

Expand Down

0 comments on commit f2f262c

Please sign in to comment.