Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Component URLInput not honouring className #13800

Merged
merged 2 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/editor/src/components/url-input/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ Renders the URL input field used by the `URLInputButton` component. It can be us

If you are not conditionally rendering this component set this property to `false`.

### `className: String`

*Optional.* Adds and optional class to the parent `div` that wraps the URLInput field and popover

## Example

{% codetabs %}
Expand Down
4 changes: 2 additions & 2 deletions packages/editor/src/components/url-input/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,11 @@ class URLInput extends Component {
}

render() {
const { value = '', autoFocus = true, instanceId } = this.props;
const { value = '', autoFocus = true, instanceId, className } = this.props;
const { showSuggestions, posts, selectedSuggestion, loading } = this.state;
/* eslint-disable jsx-a11y/no-autofocus */
return (
<div className="editor-url-input">
<div className={ classnames( 'editor-url-input', className ) }>
<input
autoFocus={ autoFocus }
type="text"
Expand Down