feat: add anchorClassName prop to stateless components
This commit is contained in:
Родитель
555347b29c
Коммит
1e7db1aeea
|
@ -13,6 +13,7 @@ export default class ComboBox extends React.Component {
|
|||
|
||||
static propTypes = {
|
||||
className: React.PropTypes.string,
|
||||
anchorClassName: React.PropTypes.string,
|
||||
data: React.PropTypes.arrayOf(React.PropTypes.oneOfType([
|
||||
React.PropTypes.object,
|
||||
React.PropTypes.string,
|
||||
|
@ -180,7 +181,7 @@ export default class ComboBox extends React.Component {
|
|||
|
||||
return (
|
||||
<span {...comboBoxProps}>
|
||||
<DropDownWrapper ref="anchor" >
|
||||
<DropDownWrapper className={this.props.anchorClassName} ref="anchor" >
|
||||
<SearchBar ref="SearchBar" {...searchBarProps} />
|
||||
<Button {...buttonProps} />
|
||||
</DropDownWrapper>
|
||||
|
|
|
@ -13,6 +13,7 @@ export default class DropDownList extends React.Component {
|
|||
|
||||
static propTypes = {
|
||||
className: PropTypes.string,
|
||||
anchorClassName: React.PropTypes.string,
|
||||
data: PropTypes.arrayOf(PropTypes.oneOfType([
|
||||
PropTypes.object,
|
||||
PropTypes.string,
|
||||
|
@ -389,7 +390,7 @@ export default class DropDownList extends React.Component {
|
|||
return (
|
||||
//TODO: aria attributes, title
|
||||
<span {...dropDownListProps}>
|
||||
<DropDownWrapper disabled={disabled} ref="anchor" >
|
||||
<DropDownWrapper className={this.props.anchorClassName} disabled={disabled} ref="anchor" >
|
||||
<span className={styles.input} unselectable="on">
|
||||
{this.renderValue()}
|
||||
</span>
|
||||
|
|
Загрузка…
Ссылка в новой задаче