-
Notifications
You must be signed in to change notification settings - Fork 883
[EuiBreadcrumb] Extend HTMLElement and EuiLink.color & [EuiPageHeader] Adding breadcrumbs as an option
#5634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
32acc1e
[EuiPageHeader] Adding `breadcrumbs` as an option
b45f249
Continuing work on page header docs
166e512
More docs
eff1571
[EuiBreadcrumb] Extending HTMLElement and adding more test/docs aroun…
c459776
[EuiPageHeader] Cleanup
2d7e278
Merge remote-tracking branch 'upstream/main' into page-header/breadcumbs
d7fe303
More cleanup
613fe15
interface refactor
thompsongl 48108a2
simplify event type
thompsongl b74c8e6
update snapshot
thompsongl 9f85cfb
Merge pull request #53 from thompsongl/5634-ts-help
cchaos f9d7be0
Update src-docs/src/views/page_header/playground.js
cchaos d0d9c5c
Merge remote-tracking branch 'upstream/main' into page-header/breadcumbs
baf15ad
Fix? breadcrumb login in header content
bdde433
Merge remote-tracking branch 'upstream/main' into page-header/breadcumbs
5b9d2cd
cl
7c80b7b
Merge branch 'elastic:main' into page-header/breadcumbs
cchaos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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,32 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { EuiBreadcrumbs, EuiBreadcrumb, EuiIcon } from '../../../../src'; | ||
|
|
||
| const breadcrumbs: EuiBreadcrumb[] = [ | ||
| { | ||
| text: 'Animals', | ||
| href: '#', | ||
| color: 'primary', | ||
| onClick: (e) => e.preventDefault(), | ||
| }, | ||
| { | ||
| text: 'Reptiles', | ||
| color: 'primary', | ||
| }, | ||
| { | ||
| text: ( | ||
| <> | ||
| <EuiIcon type="alert" size="s" /> Boa constrictor | ||
| </> | ||
| ), | ||
| title: 'Boa constrictor has an error', | ||
| href: '#', | ||
| color: 'danger', | ||
| onClick: (e) => e.preventDefault(), | ||
| }, | ||
| { | ||
| text: 'Edit', | ||
| }, | ||
| ]; | ||
|
|
||
| export default () => <EuiBreadcrumbs breadcrumbs={breadcrumbs} />; | ||
This file contains hidden or 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
34 changes: 34 additions & 0 deletions
34
src-docs/src/views/page_header/page_header_breadcrumbs.tsx
This file contains hidden or 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,34 @@ | ||
| import React from 'react'; | ||
| import { requiredProps } from '../../../../src/test'; | ||
|
|
||
| import { EuiPageHeader, EuiButton } from '../../../../src/components'; | ||
|
|
||
| export default () => ( | ||
| <EuiPageHeader | ||
| bottomBorder | ||
| pageTitle="Page title" | ||
| description="Example of a description." | ||
| breadcrumbs={[ | ||
| { | ||
| text: 'Breadcrumb 1', | ||
| href: '#', | ||
| onClick: (e) => e.preventDefault(), | ||
| }, | ||
| { | ||
| text: 'Breadcrumb 2', | ||
| href: '#', | ||
| onClick: (e) => e.preventDefault(), | ||
| }, | ||
| { | ||
| text: 'Current', | ||
| href: '#', | ||
| onClick: (e) => e.preventDefault(), | ||
| }, | ||
| ]} | ||
| rightSideItems={[ | ||
| <EuiButton fill>Add something</EuiButton>, | ||
| <EuiButton>Do something</EuiButton>, | ||
| ]} | ||
| breadcrumbProps={requiredProps} | ||
| /> | ||
| ); |
28 changes: 28 additions & 0 deletions
28
src-docs/src/views/page_header/page_header_breadcrumbs_return.tsx
This file contains hidden or 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,28 @@ | ||
| import React from 'react'; | ||
|
|
||
| import { EuiPageHeader, EuiButton, EuiIcon } from '../../../../src/components'; | ||
|
|
||
| export default () => ( | ||
| <EuiPageHeader | ||
| bottomBorder | ||
| pageTitle="Page title" | ||
| description="Example of a description." | ||
| breadcrumbs={[ | ||
| { | ||
| text: ( | ||
| <> | ||
| <EuiIcon size="s" type="arrowLeft" /> Return | ||
| </> | ||
| ), | ||
| color: 'primary', | ||
| 'aria-current': false, | ||
| href: '#', | ||
| onClick: (e) => e.preventDefault(), | ||
| }, | ||
| ]} | ||
| rightSideItems={[ | ||
| <EuiButton fill>Add something</EuiButton>, | ||
| <EuiButton>Do something</EuiButton>, | ||
| ]} | ||
| /> | ||
| ); |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe you can provide a better real-world example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is animal classification not real world? 🤣