Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Commit

Permalink
feat: add EC page banner - INNO-1379 (#75)
Browse files Browse the repository at this point in the history
* add component

* add dependency

* fix PR
  • Loading branch information
emeryro authored and yhuard committed Mar 11, 2019
1 parent 3ef9092 commit daeadd3
Show file tree
Hide file tree
Showing 9 changed files with 1,163 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ec/packages/ec-component-page-banner/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
__snapshots__
*.story.js
*.test.js
41 changes: 41 additions & 0 deletions src/ec/packages/ec-component-page-banner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# ECL Twig - EC Page Banner

npm package: `@ecl-twig/ec-component-page-banner`

```shell
npm install --save @ecl-twig/ec-component-page-banner
```

## Page Banner

### Parameters

- "type" (string) (default: 'default') Type of banner (can be 'default','image','image-shade','primary')
- "title" (string) (default: '') Title of banner
- "image" (string) (default: '') Image for banner (required for image banner type)
- "baseline" (string) (default: '') Baseline of banner
- "centered" (bool) (default: true) Define if banner should be centered
- "button" (associative array) (default: predefined structure) predefined structure for EC Button component
- "extra_classes" (optional) (string) (default: '')
- "extra_attributes" (optional) (array) (default: [])
- "name" (string) Attribute name, eg. 'data-test'
- "value" (string) Attribute value, eg: 'data-test-1'

### Example :

<!-- prettier-ignore -->
```twig
{% include 'path/to/page-header.html.twig' with {
title: 'EU Budget for the future',
baseline: 'Innovation, economy, environment and geopolitics',
centered: true,
type: 'image',
image: 'url/path-to-image',
button: {
label: 'Subscribe',
icon: {
path: 'path-to-the-icon-file',
},
},
} %}
```
Loading

0 comments on commit daeadd3

Please sign in to comment.