-
Notifications
You must be signed in to change notification settings - Fork 842
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add storybook for component since we're exporting it publicly + bette…
…r prop docs + add minor CSS style to make 'standalone' use a little easier
- Loading branch information
Showing
3 changed files
with
75 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
/* | ||
* 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 React from 'react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { EuiIcon } from '../icon'; | ||
|
||
import { EuiTreeView } from './tree_view'; | ||
import type { EuiTreeViewItemProps } from './tree_view_item'; | ||
|
||
const meta: Meta<EuiTreeViewItemProps> = { | ||
title: 'EuiTreeView.Item', | ||
component: EuiTreeView.Item, | ||
args: { | ||
// Component defaults | ||
display: 'default', | ||
hasArrow: false, | ||
isActive: false, | ||
isExpanded: false, | ||
}, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<EuiTreeViewItemProps>; | ||
|
||
export const Playground: Story = { | ||
args: { | ||
id: 'id', | ||
label: 'Hello world', | ||
icon: <EuiIcon type="folderOpen" />, | ||
children: '', | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters