🚧 create <Dropdown /> component
This commit is contained in:
parent
cd564d2d76
commit
ac0c519ccb
1 changed files with 62 additions and 0 deletions
62
client/components/Dropdown.jsx
Normal file
62
client/components/Dropdown.jsx
Normal file
|
@ -0,0 +1,62 @@
|
|||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import { Link } from 'react-router';
|
||||
|
||||
|
||||
// <ul className="nav__dropdown">
|
||||
|
||||
|
||||
// <ul className="nav__dropdown">
|
||||
|
||||
// <li className="nav__dropdown-item">
|
||||
// <button
|
||||
// onFocus={this.handleFocusForLang}
|
||||
// onBlur={this.handleBlur}
|
||||
// value="it"
|
||||
// onClick={e => this.handleLangSelection(e)}
|
||||
// >
|
||||
// Italian (Test Fallback)
|
||||
// </button>
|
||||
// </li>
|
||||
// <li className="nav__dropdown-item">
|
||||
// <button
|
||||
// onFocus={this.handleFocusForLang}
|
||||
// onBlur={this.handleBlur}
|
||||
// value="en-US"
|
||||
// onClick={e => this.handleLangSelection(e)}
|
||||
// >English
|
||||
// </button>
|
||||
// </li>
|
||||
// <li className="nav__dropdown-item">
|
||||
// <button
|
||||
// onFocus={this.handleFocusForLang}
|
||||
// onBlur={this.handleBlur}
|
||||
// value="es-419"
|
||||
// onClick={e => this.handleLangSelection(e)}
|
||||
// >
|
||||
// Español
|
||||
// </button>
|
||||
// </li>
|
||||
// </ul>
|
||||
|
||||
const Dropdown = ({ items }) => (
|
||||
<ul className="nav__dropdown">
|
||||
{items && items.map(item => (
|
||||
<li className="nav__dropdown-item">
|
||||
</li>
|
||||
))
|
||||
}
|
||||
</ul>
|
||||
);
|
||||
|
||||
Dropdown.propTypes = {
|
||||
items: PropTypes.arrayOf(PropTypes.shape({
|
||||
action: PropTypes.func
|
||||
}))
|
||||
};
|
||||
|
||||
Dropdown.defaultProps = {
|
||||
items: []
|
||||
};
|
||||
|
||||
export default Dropdown;
|
Loading…
Reference in a new issue