Skip to content

Commit

Permalink
Add EuiAvatar playground story
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Jan 10, 2024
1 parent 28c3c53 commit 089028d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/components/avatar/avatar.stories.tsx
Original file line number Diff line number Diff line change
@@ -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<EuiAvatarProps> = {
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<EuiAvatarProps>;

export const Playground: Story = {
args: {
name: 'Hello World',
},
};

0 comments on commit 089028d

Please sign in to comment.