mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-10-02 16:27:15 +05:30
Fix react warnings for Dropdown
This commit is contained in:
parent
dc168b5f23
commit
fed52bb1c6
@ -3,6 +3,7 @@ import ReactDOM from 'react-dom';
|
|||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
|
import { omit } from 'functions';
|
||||||
import { colors, COLOR_GREEN } from 'components/ui';
|
import { colors, COLOR_GREEN } from 'components/ui';
|
||||||
|
|
||||||
import styles from './dropdown.scss';
|
import styles from './dropdown.scss';
|
||||||
@ -53,13 +54,17 @@ export default class Dropdown extends FormInputComponent {
|
|||||||
|
|
||||||
const activeItem = this.getActiveItem();
|
const activeItem = this.getActiveItem();
|
||||||
const label = this.formatMessage(activeItem.label);
|
const label = this.formatMessage(activeItem.label);
|
||||||
|
const props = omit(this.props, Object.keys(Dropdown.propTypes));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div className={classNames(styles[color], {
|
<div className={classNames(styles[color], {
|
||||||
[styles.block]: block,
|
[styles.block]: block,
|
||||||
[styles.opened]: isActive
|
[styles.opened]: isActive
|
||||||
})} {...this.props} onClick={this.onToggle}>
|
})}
|
||||||
|
{...props}
|
||||||
|
onClick={this.onToggle}
|
||||||
|
>
|
||||||
<span className={styles.label}>{label}</span>
|
<span className={styles.label}>{label}</span>
|
||||||
<span className={styles.toggleIcon} />
|
<span className={styles.toggleIcon} />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user