Skip to content

Component URLInput not honouring className prop #13754

@dribba

Description

@dribba

Describe the bug
According to README.md, we should be able to pass a className prop (I assume to the <input?) into URLInput, after an attempt to use it and not being able to find the class applied to any element, I had a look at index.js where I don't see the className prop used at all.

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom block type as in the example passing a custom className:
<URLInput
    className="custom-url-input"
    value={ attributes.url }
    onChange={ ( url, post ) => setAttributes( { url, text: (post && post.title) || 'Click here' } ) }
/>

Expected behavior
The className passed to be applied to one of the rendered elements.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop

  • OS: macOS
  • Browser: Firefox
  • Version: 64

Additional context

  • Default shipped with WordPress 5.0.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good First IssueAn issue that's suitable for someone looking to contribute for the first time[Priority] LowUsed to indicate that the issue at hand isn't a top priority to address and can be handled later[Type] EnhancementA suggestion for improvement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions