mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-12-12 08:41:31 -05:00
590f505a61
This reverts commit1b1b396e92
, reversing changes made toa144bab0e6
.
38 lines
857 B
JavaScript
38 lines
857 B
JavaScript
const classNames = require('classnames');
|
|
const PropTypes = require('prop-types');
|
|
const React = require('react');
|
|
|
|
require('./subnavigation.scss');
|
|
|
|
/*
|
|
* Container for a custom, horizontal list of navigation elements
|
|
* that can be displayed within a view or component.
|
|
*/
|
|
const SubNavigation = props => (
|
|
<div
|
|
className={classNames(
|
|
[
|
|
'sub-nav',
|
|
props.className
|
|
],
|
|
{
|
|
'sub-nav-align-left': props.align === 'left',
|
|
'sub-nav-align-right': props.align === 'right'
|
|
}
|
|
)}
|
|
>
|
|
{props.children}
|
|
</div>
|
|
);
|
|
|
|
SubNavigation.propTypes = {
|
|
align: PropTypes.string,
|
|
children: PropTypes.node,
|
|
className: PropTypes.string
|
|
};
|
|
|
|
SubNavigation.defaultProps = {
|
|
align: 'middle'
|
|
};
|
|
|
|
module.exports = SubNavigation;
|