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
6 changed files
with
164 additions
and
50 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
35 changes: 35 additions & 0 deletions
35
src/app/common/component/dropdown/dropdown-menu-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,35 @@ | ||
import React, { PropTypes } from 'react' | ||
import LucioleComponent from './../../core/abstract/luciole-component' | ||
|
||
/** | ||
* LuDropdownMenu Component | ||
*/ | ||
class LuDropdownMenu extends LucioleComponent { | ||
|
||
/** | ||
* Render the component | ||
* @return {Object} React component tree | ||
*/ | ||
render () { | ||
return ( | ||
<div className='dropdown-menu'> | ||
<ul className={this.props.listClass}> | ||
{this.props.children} | ||
</ul> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
/** | ||
* The component properties' types | ||
* @type {Object} | ||
*/ | ||
LuDropdownMenu.propTypes = { | ||
listClass: PropTypes.string | ||
} | ||
|
||
/** | ||
* Export the component | ||
*/ | ||
export default LuDropdownMenu |
47 changes: 47 additions & 0 deletions
47
src/app/common/component/dropdown/dropdown-toggle-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,47 @@ | ||
import React from 'react' | ||
import LucioleComponent from './../../core/abstract/luciole-component' | ||
|
||
/** | ||
* LuDropdownToggle Component | ||
*/ | ||
class LuDropdownToggle extends LucioleComponent { | ||
|
||
/** | ||
* Create a new LuDropdownToggle component | ||
* @param {Object} props The component properties | ||
* @param {Object} context The app context | ||
*/ | ||
/* istanbul ignore next */ | ||
constructor (props, context) { | ||
super(props, context) | ||
this._bindThisToMethods('handleClick') | ||
} | ||
|
||
handleClick (e) { | ||
e.preventDefault() | ||
this.props.onClick(e) | ||
} | ||
|
||
/** | ||
* Render the component | ||
* @return {Object} React component tree | ||
*/ | ||
render () { | ||
return ( | ||
<div onClick={this.handleClick}> | ||
{this.props.children} | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
/** | ||
* The component properties' types | ||
* @type {Object} | ||
*/ | ||
LuDropdownToggle.propTypes = {} | ||
|
||
/** | ||
* Export the component | ||
*/ | ||
export default LuDropdownToggle |
42 changes: 19 additions & 23 deletions
42
src/app/module/main/component/main-lang-card-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
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