From 089028d95d95108f7dcd1f90c9f5f2aac9c9d93a Mon Sep 17 00:00:00 2001 From: Cee Chen Date: Wed, 10 Jan 2024 14:56:51 -0800 Subject: [PATCH] Add EuiAvatar playground story --- src/components/avatar/avatar.stories.tsx | 40 ++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/components/avatar/avatar.stories.tsx diff --git a/src/components/avatar/avatar.stories.tsx b/src/components/avatar/avatar.stories.tsx new file mode 100644 index 00000000000..048bd05f0b8 --- /dev/null +++ b/src/components/avatar/avatar.stories.tsx @@ -0,0 +1,40 @@ +/* + * 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 { EuiAvatar, EuiAvatarProps } from './avatar'; + +const meta: Meta = { + title: 'EuiAvatar', + component: EuiAvatar, + argTypes: { + initialsLength: { + options: [undefined, 1, 2], + }, + color: { control: 'text' }, + iconType: { control: 'text' }, + iconColor: { control: 'text' }, + }, + args: { + // Component defaults + casing: 'uppercase', + size: 'm', + type: 'user', + isDisabled: false, + }, +}; + +export default meta; +type Story = StoryObj; + +export const Playground: Story = { + args: { + name: 'Hello World', + }, +};