Skip to content

Commit

Permalink
Add EuiAccordion playground story
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Jan 10, 2024
1 parent af2815a commit 6dee19c
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/components/accordion/accordion.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License
* 2.0 and the Server Side Public License, v 1; you may not use this file except
* in compliance with, at your election, the Elastic License 2.0 or the Server
* Side Public License, v 1.
*/

import type { Meta, StoryObj } from '@storybook/react';

import { EuiAccordion, EuiAccordionProps } from './accordion';

const meta: Meta<EuiAccordionProps> = {
title: 'EuiAccordion',
component: EuiAccordion,
argTypes: {
forceState: {
options: [undefined, 'closed', 'open'],
},
},
args: {
// Component defaults
role: 'group',
element: 'div',
buttonElement: 'button',
arrowDisplay: 'left',
borders: 'none',
initialIsOpen: false,
isDisabled: false,
isLoading: false,
isLoadingMessage: '',
},
};

export default meta;
type Story = StoryObj<EuiAccordionProps>;

export const Playground: Story = {
args: {
buttonContent: 'Accordion toggle content',
children: 'Accordion content',
},
};

0 comments on commit 6dee19c

Please sign in to comment.