This repository has been archived by the owner on May 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(breadcrumb-harmonised): Add component - TWIG-95 (#202)
- Loading branch information
Showing
10 changed files
with
953 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
src/ec/packages/ec-component-breadcrumb-harmonised/.npmignore
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,4 @@ | ||
__snapshots__ | ||
*.story.js | ||
*.test.js | ||
**/*.md |
59 changes: 59 additions & 0 deletions
59
src/ec/packages/ec-component-breadcrumb-harmonised/README.md
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,59 @@ | ||
# ECL Twig - EC Breadcrumb Harmonised component | ||
|
||
npm package: `@ecl-twig/ec-component-breadcrumb-harmonised` | ||
|
||
```shell | ||
npm install --save @ecl-twig/ec-component-breadcrumb-harmonised | ||
``` | ||
|
||
## Breadcrumb Harmonised | ||
|
||
### Parameters | ||
|
||
- "links" (array) (default: []): format: | ||
- "label" (string) (default: '') Label of link | ||
- "path" (string) (default: '') Url of link | ||
- "navigation_text" (string) (default: ''): Text of navigation in breadcrumb | ||
- "ellipsis_label" (string) (default: ''): Label of the ellipsis, e.g. "Click to expand" | ||
- "icon_file_path" (string) (default: ''): URL to icons file | ||
- "extra_classes" (string) (default: '') | ||
- "extra_attributes" (array) (default: []): format: | ||
- "name" (string) (default: '') | ||
- "value" (string) (default: '') | ||
|
||
### Example : | ||
|
||
<!-- prettier-ignore --> | ||
```twig | ||
{% include '@ecl-twig/ec-component-breadcrumb-harmonised/breadcrumb-harmonised.html.twig' with { | ||
links: [ | ||
{ | ||
label: 'Link 1', | ||
path: '/example' | ||
}, | ||
{ | ||
label: 'Link 2', | ||
path: '/example' | ||
}, | ||
{ | ||
label: 'Link 3', | ||
path: '/example' | ||
}, | ||
{ | ||
label: 'Link 4', | ||
path: '/example' | ||
}, | ||
{ | ||
label: 'Link 5', | ||
path: '/example' | ||
}, | ||
{ | ||
label: 'Link 6', | ||
path: '/example' | ||
}, | ||
], | ||
icon_file_path: '/path-to-the-icons-file', | ||
navigation_text: 'You are here:', | ||
ellipsis_label: 'Click to expand' | ||
} %} | ||
``` |
Oops, something went wrong.