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,56 @@
import Button from '../button';
import './column_inline_form.scss';
export default class ColumnInlineForm extends PureComponent {
static propTypes = {
value: PropTypes.string.isRequired,
onChange: PropTypes.func.isRequired,
onSubmit: PropTypes.func.isRequired,
label: PropTypes.string.isRequired,
btnTitle: PropTypes.string.isRequired,
disabled: PropTypes.bool,
};
handleChange = e => {
this.props.onChange(e.target.value);
}
handleSubmit = e => {
e.preventDefault();
this.props.onSubmit();
}
handleClick = () => {
this.props.onSubmit();
}
render() {
const { value, label, btnTitle, disabled } = this.props;
return (
<form className='column-inline-form' onSubmit={this.handleSubmit}>
<label className='column-inline-form__block'>
<span className='column-inline-form__title'>{label}</span>
<input
className='column-inline-form__input'
value={value}
disabled={disabled}
onChange={this.handleChange}
placeholder={label}
/>
</label>
<Button
className='column-inline-form__btn'
disabled={disabled}
onClick={this.handleClick}
>
{btnTitle}
</Button>
</form>
);
}
}

View File

@@ -0,0 +1,28 @@
.column-inline-form {
padding: 7px 5px 7px 15px;
background: lighten($ui-base-color, 4%);
@include flex(flex-start, center);
&__block {
flex: 1 1 auto;
}
&__title {
}
&__input {
width: 100%;
margin-bottom: 6px;
&:focus {
outline: 0;
}
}
&__btn {
flex: 0 0 auto;
margin: 0 5px;
}
}

View File

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