Skip to content

Add default searchingIndicator prop for searchbox component #76

@kellyi

Description

@kellyi

Overview

Currently the search box will render a searchingIndicator React node passed in as an optional prop from Unity Bar's host application to be rendered when the isSearching prop is set to be true.

In cases when isSearching is true but no searchingIndicator prop has been passed in, the current fallback is to keep displaying the magnifying glass icon.

However, it'd be preferable to give the search box a defaultProp to render in cases when searchingIndicator is null. We can use a cleaned up FA SVG to match the other icons. This would make it so other apps don't have to pass in a searching indicator at all and still enable the search box to get into a searching state.

Describe the solution you'd like

  • add a cleaned up FA spinner SVG. Check with @lederer about what is the correct icon to use and what is the correct cleaning to do on the SVG file.

  • include the spinner icon in the SVGIcons component with an ID like pwdub-icon-spinner

  • use something like this as the defaultProp for the searchingIndicator in the UnityBar:

<svg className="icon" aria-hidden="true">
    <use xlinkHref="#pwdub-icon-spinner" />
</svg>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions