-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eu/templates): add campaign template - INNO-1258 (#888)
* fix(cards): remove max-width * feat(campaign): bootstrap campaign template * feat(campaign): make use of paragraph utility * feat(campaign): make use of fragment * add missing labels
- Loading branch information
Showing
13 changed files
with
192 additions
and
10 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
83 changes: 83 additions & 0 deletions
83
src/systems/eu/implementations/react/packages/campaign-page/CampaignPage.jsx
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,83 @@ | ||
import React, { Fragment } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import Blockquote from '@ecl/eu-react-component-blockquote/Blockquote'; | ||
import Card from '@ecl/eu-react-component-card/Card'; | ||
import Footer from '@ecl/eu-react-component-footer/Footer'; | ||
import MediaContainer from '@ecl/eu-react-component-media-container/MediaContainer'; | ||
import HeroBanner from '@ecl/eu-react-component-hero-banner/HeroBanner'; | ||
import SiteHeader from '@ecl/eu-react-component-site-header/SiteHeader'; | ||
|
||
const CampaignPage = ({ | ||
siteHeader, | ||
heroBanner, | ||
mediaContainer, | ||
footer, | ||
card, | ||
blockquote, | ||
}) => ( | ||
<Fragment> | ||
<SiteHeader {...siteHeader} /> | ||
<HeroBanner {...heroBanner} /> | ||
<main className="ecl-u-pv-xl"> | ||
<div className="ecl-container"> | ||
<div className="ecl-row"> | ||
<div className="ecl-col-sm-12 ecl-col-md-6"> | ||
<MediaContainer {...mediaContainer} /> | ||
</div> | ||
|
||
<div className="ecl-col-sm-12 ecl-col-md-6"> | ||
<p className="ecl-u-type-paragraph"> | ||
The European Commission has put forward ambitious yet realistic | ||
proposals for a modern EU budget. It is time for an EU budget that | ||
reflects rapid developments in innovation, the economy, the | ||
environment and geopolitics, amongst others. The Commission is | ||
putting forward modern, clearer and simpler EU financial rules | ||
that ensure the EU budget delivers on the issues that matter to | ||
Europeans. | ||
</p> | ||
</div> | ||
</div> | ||
|
||
<div className="ecl-row ecl-u-mt-l"> | ||
<div className="ecl-col-sm-12 ecl-col-md-4"> | ||
<Card {...card} /> | ||
</div> | ||
<div className="ecl-col-sm-12 ecl-col-md-4"> | ||
<Card {...card} /> | ||
</div> | ||
<div className="ecl-col-sm-12 ecl-col-md-4"> | ||
<Card {...card} /> | ||
</div> | ||
</div> | ||
<div className="ecl-row ecl-u-mt-l"> | ||
<div className="ecl-col-sm-12 ecl-col-md-12"> | ||
<Blockquote {...blockquote} /> | ||
</div> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
<Footer {...footer} /> | ||
</Fragment> | ||
); | ||
|
||
CampaignPage.propTypes = { | ||
siteHeader: PropTypes.shape(SiteHeader.propTypes), | ||
heroBanner: PropTypes.shape(HeroBanner.propTypes), | ||
mediaContainer: PropTypes.shape(MediaContainer.propTypes), | ||
footer: PropTypes.shape(Footer.propTypes), | ||
card: PropTypes.shape(Card.propTypes), | ||
blockquote: PropTypes.shape(Blockquote.propTypes), | ||
}; | ||
|
||
CampaignPage.defaultProps = { | ||
siteHeader: {}, | ||
heroBanner: {}, | ||
mediaContainer: {}, | ||
footer: {}, | ||
card: {}, | ||
blockquote: {}, | ||
}; | ||
|
||
export default CampaignPage; |
44 changes: 44 additions & 0 deletions
44
src/systems/eu/implementations/react/packages/campaign-page/package.json
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,44 @@ | ||
{ | ||
"name": "@ecl/eu-react-campaign-page", | ||
"author": "European Commission", | ||
"license": "EUPL-1.1", | ||
"version": "2.0.0-alpha.2", | ||
"description": "ECL EU React Campaign Page", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ec-europa/europa-component-library.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ec-europa/europa-component-library/issues" | ||
}, | ||
"homepage": "https://github.com/ec-europa/europa-component-library", | ||
"keywords": [ | ||
"ecl", | ||
"europa-component-library", | ||
"design-system", | ||
"react" | ||
], | ||
"dependencies": { | ||
"@ecl/eu-react-component-blockquote": "^2.0.0-alpha.2", | ||
"@ecl/eu-react-component-card": "^2.0.0-alpha.2", | ||
"@ecl/eu-react-component-footer": "^2.0.0-alpha.2", | ||
"@ecl/eu-react-component-media-container": "^2.0.0-alpha.2", | ||
"@ecl/eu-react-component-hero-banner": "^2.0.0-alpha.2", | ||
"@ecl/eu-react-component-site-header": "^2.0.0-alpha.2" | ||
}, | ||
"devDependencies": { | ||
"@ecl/eu-layout-grid": "^2.0.0-alpha.2", | ||
"@ecl/eu-specs-campaign-page": "^2.0.0-alpha.2", | ||
"@ecl/eu-utility-margin": "^2.0.0-alpha.2", | ||
"@ecl/eu-utility-typography": "^2.0.0-alpha.2" | ||
}, | ||
"peerDependencies": { | ||
"classnames": "^2.2.6", | ||
"prop-types": "^15.6.2", | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
src/systems/eu/implementations/react/packages/campaign-page/stories/Index.jsx
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,26 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react'; | ||
import { withKnobs } from '@storybook/addon-knobs'; | ||
|
||
import siteHeaderContent from '@ecl/eu-specs-site-header/demo/data'; | ||
import heroBannerContent from '@ecl/eu-specs-hero-banner/demo/data--image'; | ||
import mediaContainerContent from '@ecl/ec-specs-media-container/demo/data--video'; | ||
import cardContent from '@ecl/eu-specs-card/demo/data--card'; | ||
import blockquoteContent from '@ecl/eu-specs-blockquote/demo/data'; | ||
import footerContent from '@ecl/eu-specs-footer/demo/data'; | ||
|
||
import CampaignPage from '../CampaignPage'; | ||
|
||
storiesOf('Campaign page', module) | ||
.addDecorator(withKnobs) | ||
.add('default', () => ( | ||
<CampaignPage | ||
siteHeader={siteHeaderContent} | ||
heroBanner={heroBannerContent} | ||
card={cardContent} | ||
footer={footerContent} | ||
mediaContainer={mediaContainerContent} | ||
blockquote={blockquoteContent} | ||
/> | ||
)); |
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
8 changes: 4 additions & 4 deletions
8
...ems/eu/specs/templates/campaign/config.js → ...u/specs/templates/campaign-page/config.js
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Playground from '@ecl/website-components/Playground' | ||
|
||
<Playground | ||
system="eu" | ||
selectedKind="Campaign page" | ||
selectedStory="default" | ||
> | ||
No preview available, use the Playground or Fullscreen links | ||
</Playground> |
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 @@ | ||
Do's and don'ts |
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,23 @@ | ||
{ | ||
"name": "@ecl/eu-specs-campaign-page", | ||
"author": "European Commission", | ||
"license": "EUPL-1.1", | ||
"version": "2.0.0-alpha.2", | ||
"description": "ECL EU Campaign Page Specs", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/ec-europa/europa-component-library.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/ec-europa/europa-component-library/issues" | ||
}, | ||
"homepage": "https://github.com/ec-europa/europa-component-library", | ||
"keywords": [ | ||
"ecl", | ||
"europa-component-library", | ||
"design-system" | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.