Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
158 additions
and
12 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
src/app/common/component/page-header/page-header-component.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,38 @@ | ||
import React, { PropTypes } from 'react' | ||
import FontAwesome from 'react-fontawesome' | ||
import LucioleComponent from './../../core/abstract/luciole-component' | ||
import LuI18n from './../i18n/luciole-i18n-component' | ||
|
||
/** | ||
* LuciolePageHeader Component | ||
* A component used for page's header | ||
*/ | ||
class LuciolePageHeader extends LucioleComponent { | ||
|
||
/** | ||
* Render the component | ||
* @return {Object} React component tree | ||
*/ | ||
render () { | ||
return ( | ||
<div className='page-header'> | ||
<FontAwesome size='2x' name={this.props.icon} /> | ||
<h2><LuI18n value={this.props.title} /></h2> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
/** | ||
* The component properties' types | ||
* @type {Object} | ||
*/ | ||
LuciolePageHeader.propTypes = { | ||
icon: PropTypes.string.isRequired, | ||
title: PropTypes.string.isRequired | ||
} | ||
|
||
/** | ||
* Export the component | ||
*/ | ||
export default LuciolePageHeader |
42 changes: 42 additions & 0 deletions
42
src/app/common/component/page-header/page-header-component.spec.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,42 @@ | ||
/* import React from 'react' | ||
import {shallow} from 'enzyme' | ||
import {expect} from 'chai' | ||
import LucioleSVG from './luciole-svg-component' | ||
import ReactSVG from 'react-svg' | ||
describe('LucioleSVG', () => { | ||
describe('render', () => { | ||
const props = { | ||
path: 'pathprop', | ||
callback: () => { return 0 }, | ||
class: 'classnameprop' | ||
} | ||
it('Expect to contain ReactSVG', () => { | ||
const wrapper = shallow(<LucioleSVG {...props} />) | ||
expect(wrapper.find(ReactSVG)).to.be.length(1) | ||
}) | ||
it('Expect to contain ReactSVG with good prop path', () => { | ||
const wrapper = shallow(<LucioleSVG {...props} />) | ||
const actual = wrapper.find(ReactSVG).props().path | ||
const expected = 'pathprop' | ||
expect(actual).to.be.equal(expected) | ||
}) | ||
it('Expect to contain ReactSVG with good prop callback', () => { | ||
const wrapper = shallow(<LucioleSVG {...props} />) | ||
const actual = wrapper.find(ReactSVG).props().callback | ||
const expected = props.callback | ||
expect(actual).to.be.equal(expected) | ||
}) | ||
it('Expect to contain ReactSVG with good prop className', () => { | ||
const wrapper = shallow(<LucioleSVG {...props} />) | ||
const actual = wrapper.find(ReactSVG).props().className | ||
const expected = 'classnameprop' | ||
expect(actual).to.be.equal(expected) | ||
}) | ||
}) | ||
}) | ||
*/ |
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
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
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,22 @@ | ||
/****************************** | ||
* CONTACT CONTAINER | ||
* *****************************/ | ||
|
||
.contact-form{ | ||
padding-left: 30%; | ||
padding-right: 30%; | ||
input{ | ||
width: 100%; | ||
} | ||
.buttons{ | ||
text-align: center; | ||
|
||
button{ | ||
width: 100%; | ||
margin: 0 0 0 0; | ||
} | ||
} | ||
textarea{ | ||
height: 20em; | ||
} | ||
} |
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