-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Better breadcrumb truncation (#1346)
- Loading branch information
Showing
18 changed files
with
377 additions
and
212 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
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
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,19 +1,56 @@ | ||
import React from 'react'; | ||
|
||
import { | ||
EuiBreadcrumbs, | ||
} from '../../../../src/components'; | ||
import { EuiBreadcrumbs, EuiSpacer, EuiTitle } from '../../../../src/components'; | ||
|
||
export default () => { | ||
const breadcrumbs = [{ | ||
text: 'Animals', | ||
href: '#', | ||
}, { | ||
text: 'Metazoans is a real mouthful, especially for creatures without mouths', | ||
href: '#', | ||
}, { | ||
text: 'Nebulosa subspecies', | ||
}]; | ||
const breadcrumbs = [ | ||
{ | ||
text: 'Animals', | ||
href: '#', | ||
}, | ||
{ | ||
text: 'Metazoans is a real mouthful, especially for creatures without mouths', | ||
href: '#', | ||
truncate: true, | ||
}, | ||
{ | ||
text: 'Chordates', | ||
href: '#', | ||
}, | ||
{ | ||
text: 'Vertebrates', | ||
href: '#', | ||
}, | ||
{ | ||
text: 'Tetrapods', | ||
href: '#', | ||
}, | ||
{ | ||
text: 'Reptiles', | ||
href: '#', | ||
}, | ||
{ | ||
text: 'Boa constrictor', | ||
href: '#', | ||
}, | ||
{ | ||
text: 'Nebulosa subspecies is also a real mouthful, especially for creatures without mouths', | ||
}, | ||
]; | ||
|
||
return <EuiBreadcrumbs responsive={false} breadcrumbs={breadcrumbs} />; | ||
return ( | ||
<div> | ||
<EuiTitle size="xs"> | ||
<span>Truncation on a single item</span> | ||
</EuiTitle> | ||
<EuiSpacer size="s" /> | ||
<EuiBreadcrumbs responsive={false} truncate={false} breadcrumbs={breadcrumbs} /> | ||
<EuiSpacer /> | ||
<EuiTitle size="xs"> | ||
<span>Truncation on the entire set</span> | ||
</EuiTitle> | ||
<EuiSpacer size="s" /> | ||
<EuiBreadcrumbs responsive={false} truncate={true} breadcrumbs={breadcrumbs} /> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.