Enable theming of Input component inside Dropdown component.

Related to #877 and #920 and commit #d0a9032
old
T James 2016-12-05 15:26:35 +13:00
parent a8e1bb7668
commit c5b147307e
2 changed files with 4 additions and 0 deletions

View File

@ -202,6 +202,8 @@ const factory = (Input) => {
readOnly
ref={node => { this.inputNode = node && node.getWrappedInstance(); }}
type={template && selected ? 'hidden' : null}
theme={theme}
themeNamespace="input"
value={selected && selected.label ? selected.label : ''}
/>
{template && selected ? this.renderTemplateValue(selected) : null}

View File

@ -55,6 +55,8 @@ If you want to provide a theme via context, the component key is `RTDropdown`.
## Theming
This component uses an `Input` under the covers. The theme object is passed down namespaced under `input` keyword. This means you can use the same theme classNames from `Input` component but namespaced with `input`. For example, to style the label you have to use `inputLabel` className.
| Name | Description|
|:----------------|:-----------|
| `active` | Added to the root element when the dropdown is active.|