gravity-ui / components

A set of complex React components.

Home Page:https://preview.gravity-ui.com/components

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve(FilePreview)

lu-perfect opened this issue · comments

There are a lot of complex features that can be taken out as separate components or libraries, I just wrote everything I would like to see

  1. Add several sizes, I also want to use them in a system that simulates file storage on the web. In particular, you want to have a super small size or maybe a direction property to place it in the table
  2. Add folders
  3. I want to have two modes - dynamic and static.
    In the first one, as you have, a file is accepted and your component automatically determines which icon to display, which data, etc. This is not the case now. At the same time, it is desirable that the developer has the opportunity to give either a link or the file itself.
    In the second one, I do not want to write as any, I want to specify the characteristics of the file in order to display them, for example, taken from the database initially, why I should implement the web api File interface is not entirely clear.
    Now you have implemented something in between
  4. It is also worth considering the 'selected' state, if we are emulating a file system, we want to have this feature
  5. It would also be very nice to see adapters, or write your own solutions to implement quick viewing of photos, videos at least, the rest as needed