Skip to content

Instantly share code, notes, and snippets.

@WesSouza
Created August 19, 2022 11:35
Show Gist options
  • Save WesSouza/9d09aecc916c3ab8c82934615a848007 to your computer and use it in GitHub Desktop.
Save WesSouza/9d09aecc916c3ab8c82934615a848007 to your computer and use it in GitHub Desktop.

Revisions

  1. Wes Souza created this gist Aug 19, 2022.
    12 changes: 12 additions & 0 deletions Component.tsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    export Google({ customAriaLabelForSomeReason }) {
    const { getInputProps, options } = useGoogle();

    const inputProps = getInputProps({ 'aria-label': customAriaLabelForSomeReason })

    return (
    <div>
    <input {...inputProps} />
    {options.length ? <div>{options.map(...)}</div> : ''}
    </div>
    )
    }