Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Allow icons to be set by type of file #38

Open
marpontes opened this issue Nov 25, 2018 · 1 comment
Open

Allow icons to be set by type of file #38

marpontes opened this issue Nov 25, 2018 · 1 comment

Comments

@marpontes
Copy link

It would very nice to be able to define icons by type of file like so:

<FileBrowser
  ... 
  iconsByType={{
    txt: <i ... />,
    csv: <i ... />,
    pdf: <i ... />,
    exdef: <i ... />,
    default: <i ... />,
    folder:  <i ... />,
  }}
  icons={{
      Rename: <i className="i-cursor" aria-hidden="true" />,
      Folder: <i className="folder" aria-hidden="true" />,
      FolderOpen: <i className="folder-open" aria-hidden="true" />,
      Delete: <i className="trash" aria-hidden="true" />,
      Loading: <i className="circle-notch spin" aria-hidden="true" />,
  }}
/>

The icons prop could be kept for specific mappings.

@tabby-or-not
Copy link
Contributor

Nice idea 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants