Skip to content

Commit

Permalink
Merge pull request react-toolbox#1027 from t22james/dev
Browse files Browse the repository at this point in the history
Enable theming of Input component inside Dropdown component.
  • Loading branch information
javivelasco authored Dec 5, 2016
2 parents 7fa16af + c5b1473 commit 47858ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
2 changes: 2 additions & 0 deletions components/dropdown/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.|
Expand Down

0 comments on commit 47858ad

Please sign in to comment.