Another large update for all components

reorganization, linting, updating file imports, consolidation
warning: there will be errors in this commit
todo: update webpack, add missing styles, scss files, consolidate group page components.
This commit is contained in:
mgabdev
2019-08-09 12:06:27 -04:00
parent 280dc51d85
commit 3d509c84a2
183 changed files with 4802 additions and 2361 deletions

View File

@@ -0,0 +1,40 @@
import { Link } from 'react-router-dom';
import classNames from 'classnames';
import Icon from '../icon';
import './column_header_setting_button.scss';
export default class ColumnHeaderSettingButton extends PureComponent {
static propTypes = {
title: PropTypes.node.isRequired,
icon: PropTypes.string.isRequired,
onClick: PropTypes.func.isRequired,
to: PropTypes.string,
};
render () {
const { title, icon, to } = this.props;
const classes = classNames('column-header-setting-btn', {
'column-header-setting-btn--link': !!to
});
if (to) {
return (
<Link to={to} className={classes}>
{title}
<Icon id={icon} />
</Link>
)
}
return (
<button className={classes} tabIndex='0' onClick={this.props.onClick}>
<Icon id={icon} />
{title}
</button>
);
}
}

View File

@@ -0,0 +1,28 @@
.column-header-setting-btn {
display: inline-block;
padding: 0;
font-family: inherit;
font-size: inherit;
color: inherit;
border: 0;
background: transparent;
cursor: pointer;
padding: 0 10px;
&:last-child {
padding-right: 0;
}
&:hover {
color: $darker-text-color;
text-decoration: underline;
}
&--link {
text-decoration: none;
.fa {
margin-left: 10px;
}
}
}

View File

@@ -0,0 +1 @@
export { default } from './column_header_setting_button';