-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Breadcrumbs): для хлебных крошек добавлен параметр iconStart, по…
…зволяющий задавать иконку слева от отекста крошки
- Loading branch information
1 parent
ddeef1e
commit 2283272
Showing
4 changed files
with
39 additions
and
22 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
29 changes: 12 additions & 17 deletions
29
src/components/Breadcrumbs/stories/BreadcrumbsIcons.template.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 |
---|---|---|
@@ -1,28 +1,23 @@ | ||
import * as React from 'react'; | ||
import { Breadcrumbs } from '@admiral-ds/react-ui'; | ||
import type { BreadcrumbsProps } from '@admiral-ds/react-ui'; | ||
import { ReactComponent as HomeOutline } from '@admiral-ds/icons/build/system/HomeOutline.svg'; | ||
import { ReactComponent as IconsOutline } from '@admiral-ds/icons/build/category/IconsOutline.svg'; | ||
import { ReactComponent as JpgOutline } from '@admiral-ds/icons/build/documents/JpgOutline.svg'; | ||
|
||
const items = [ | ||
{ url: '#', text: 'page 1', iconStart: <HomeOutline /> }, | ||
{ url: '#', text: 'page 2222222222222222222222222222222222222222' }, | ||
{ url: '#', text: 'page 3', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 4', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 5', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 6', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 7', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 8', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 9', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 10', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 11', iconStart: <IconsOutline /> }, | ||
{ url: '#', text: 'page 2222222222222222222222222222222222222222', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 3', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 4', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 5', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 6', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 7', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 8', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 9', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 10', iconStart: <JpgOutline /> }, | ||
{ url: '#', text: 'page 11', iconStart: <JpgOutline /> }, | ||
{ text: 'current page' }, | ||
]; | ||
|
||
export const BreadcrumbsIconsTemplate = () => { | ||
return ( | ||
<> | ||
<Breadcrumbs items={items} dropContainerClassName="dropContainerClass" /> | ||
</> | ||
); | ||
return <Breadcrumbs items={items} dropContainerClassName="dropContainerClass" />; | ||
}; |