Облагорожена вёрстка формы обратной связи.

Часть общих стилей вынесена в компонент Popup
Образован базовый (прям ненастоящий) компонент Dropdown
This commit is contained in:
ErickSkrauch
2016-05-26 00:37:18 +03:00
parent 40466189fd
commit 69dc3e3ce8
11 changed files with 264 additions and 55 deletions

View File

@@ -0,0 +1,41 @@
import React, { PropTypes } from 'react';
import classNames from 'classnames';
import styles from 'components/ui/dropdown.scss';
import FormComponent from './FormComponent';
export default class Dropdown extends FormComponent {
static displayName = 'Dropdown';
static propTypes = {
label: PropTypes.oneOfType([
PropTypes.shape({
id: PropTypes.string
}),
PropTypes.string
]).isRequired,
block: PropTypes.bool,
color: PropTypes.oneOf(['green', 'blue', 'red', 'lightViolet', 'darkBlue', 'violet'])
};
render() {
const { color = 'green', block } = this.props;
const props = {
...this.props
};
props.label = this.formatMessage(props.label);
return (
<div className={classNames(styles[color], {
[styles.block]: block
})} {...props}>
{props.label}
<span className={styles.toggleIcon} />
</div>
);
}
}