Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(main-policy-hub): add content type - INNO-1879 (#1384)
* init * update content type * update content type * fix ct and update border utilities * fix sizes * update * fix sizes * small fixes
- Loading branch information
Showing
13 changed files
with
1,566 additions
and
126 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
56 changes: 56 additions & 0 deletions
56
src/systems/ec/implementations/react/templates/pages/main-policy-hub/examples/Default.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,56 @@ | ||
/* eslint-disable import/no-extraneous-dependencies */ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import getData from '@ecl/ec-specs-main-policy-hub-page/demo/data'; | ||
|
||
import MainPolicyHubPage from '../src/MainPolicyHubPage'; | ||
|
||
class MainPolicyHubExample extends React.Component { | ||
constructor(props) { | ||
super(props); | ||
this.components = null; | ||
} | ||
|
||
componentDidMount() { | ||
if (!window.ECL) return; | ||
this.components = window.ECL.autoInit(); | ||
} | ||
|
||
componentDidUpdate() { | ||
if (!window.ECL) return; | ||
|
||
if (this.components) { | ||
this.components.forEach(c => c.destroy()); | ||
} | ||
|
||
this.components = window.ECL.autoInit(); | ||
} | ||
|
||
componentWillUnmount() { | ||
if (!window.ECL) return; | ||
|
||
if (this.components) { | ||
this.components.forEach(c => c.destroy()); | ||
} | ||
} | ||
|
||
render() { | ||
const { template } = this.props; | ||
const data = getData(template); | ||
|
||
return ( | ||
<MainPolicyHubPage | ||
siteHeader={data.siteHeader} | ||
footer={data.footer} | ||
template={template} | ||
/> | ||
); | ||
} | ||
} | ||
|
||
MainPolicyHubExample.propTypes = { | ||
template: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default MainPolicyHubExample; |
1 change: 1 addition & 0 deletions
1
src/systems/ec/implementations/react/templates/pages/main-policy-hub/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default from './src/MainPolicyHubPage'; |
45 changes: 45 additions & 0 deletions
45
src/systems/ec/implementations/react/templates/pages/main-policy-hub/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,45 @@ | ||
{ | ||
"private": true, | ||
"name": "@ecl/ec-react-main-policy-hub-page", | ||
"author": "European Commission", | ||
"license": "EUPL-1.1", | ||
"version": "2.13.0", | ||
"description": "ECL EC React Main Policy Hub Page", | ||
"main": "index.js", | ||
"module": "index.js", | ||
"dependencies": { | ||
"@ecl/ec-react-component-breadcrumb-core": "^2.13.0", | ||
"@ecl/ec-react-component-breadcrumb-harmonised": "^2.13.0", | ||
"@ecl/ec-react-component-breadcrumb-standardised": "^2.13.0", | ||
"@ecl/ec-react-component-date-block": "^2.13.0", | ||
"@ecl/ec-react-component-description-list": "^2.13.0", | ||
"@ecl/ec-react-component-footer-core": "^2.13.0", | ||
"@ecl/ec-react-component-footer-harmonised": "^2.13.0", | ||
"@ecl/ec-react-component-footer-standardised": "^2.13.0", | ||
"@ecl/ec-react-component-link": "^2.13.0", | ||
"@ecl/ec-react-component-page-header-core": "^2.13.0", | ||
"@ecl/ec-react-component-page-header-harmonised": "^2.13.0", | ||
"@ecl/ec-react-component-page-header-standardised": "^2.13.0", | ||
"@ecl/ec-react-component-site-header-core": "^2.13.0", | ||
"@ecl/ec-react-component-site-header-harmonised": "^2.13.0", | ||
"@ecl/ec-react-component-site-header-standardised": "^2.13.0", | ||
"@ecl/ec-react-component-social-media-follow": "^2.13.0", | ||
"@ecl/ec-react-component-social-media-share": "^2.13.0", | ||
"@ecl/ec-react-component-timeline2": "^2.13.0" | ||
}, | ||
"devDependencies": { | ||
"@ecl/ec-layout-grid": "^2.13.0", | ||
"@ecl/ec-specs-main-policy-hub-page": "^2.13.0", | ||
"@ecl/ec-utility-dimension": "^2.13.0", | ||
"@ecl/ec-utility-display": "^2.13.0", | ||
"@ecl/ec-utility-flex": "^2.13.0", | ||
"@ecl/ec-utility-spacing": "^2.13.0", | ||
"@ecl/ec-utility-typography": "^2.13.0" | ||
}, | ||
"peerDependencies": { | ||
"classnames": "^2.2.6", | ||
"prop-types": "^15.6.2", | ||
"react": "^16.4.2", | ||
"react-dom": "^16.4.2" | ||
} | ||
} |
Oops, something went wrong.