Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview icon backport #155

Merged
merged 2 commits into from
May 5, 2020
Merged

Conversation

max-carroll
Copy link
Contributor

@max-carroll max-carroll commented May 5, 2020

Description

This is a backport of a PR already implemented implemented, but here's the description of that PR

I have created a new prop getPreviewIcon which allows you to pass your own function which determines which Preview Icon should be displayed for selected file.

I also added an example in the markdown as this was useful for testing, and thought it would also be useful so that people can see how to use the prop and a possible use case for it

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested

  • Test A - Checked preview icons worked as before with Images and Non Images
  • Test B - Checked bespoke functions work and correctly display a new icon as in the new example for PDFs, Audio etc...

Test Configuration:

  • Browser:

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@max-carroll max-carroll changed the base branch from master to v2.x May 5, 2020 11:00
@panz3r panz3r added this to the 2.6 milestone May 5, 2020
Copy link
Contributor

@panz3r panz3r left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@panz3r panz3r merged commit 03cd9bd into Yuvaleros:v2.x May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The preview Icon could be specific to the type of file (at the moment its just a paperclip)
2 participants