-
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 EuiHeaderLinks story - Skipping `EuiHeaderLink` story for now as it really just has one meaningful prop that's already being tested/displayed in `EuiHeaderLinks` - Update EuiHeader story with everything put together in `sections` - Expand EuiHeaderLogo stories
- Loading branch information
Showing
9 changed files
with
119 additions
and
8 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 |
---|---|---|
@@ -1 +0,0 @@ | ||
@import 'header_links/index'; | ||
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
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
Empty file.
43 changes: 43 additions & 0 deletions
43
src/components/header/header_links/header_links.stories.tsx
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,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 React from 'react'; | ||
import type { Meta, StoryObj } from '@storybook/react'; | ||
|
||
import { EuiHeader, EuiHeaderSection, EuiHeaderSectionItem } from '../'; | ||
|
||
import { EuiHeaderLink } from './header_link'; | ||
import { EuiHeaderLinks, EuiHeaderLinksProps } from './header_links'; | ||
|
||
const meta: Meta<EuiHeaderLinksProps> = { | ||
title: 'EuiHeaderLinks', | ||
component: EuiHeaderLinks, | ||
}; | ||
|
||
export default meta; | ||
type Story = StoryObj<EuiHeaderLinksProps>; | ||
|
||
export const Playground: Story = { | ||
render: ({ ...args }) => ( | ||
<EuiHeader position="fixed"> | ||
<EuiHeaderSection> | ||
<EuiHeaderSectionItem> | ||
<EuiHeaderLinks {...args}> | ||
<EuiHeaderLink isActive>Docs</EuiHeaderLink> | ||
<EuiHeaderLink>Code</EuiHeaderLink> | ||
<EuiHeaderLink iconType="help"> Help</EuiHeaderLink> | ||
</EuiHeaderLinks> | ||
</EuiHeaderSectionItem> | ||
</EuiHeaderSection> | ||
</EuiHeader> | ||
), | ||
args: { | ||
gutterSize: 's', | ||
popoverBreakpoints: ['xs', 's'], | ||
}, | ||
}; |
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