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

Image component: pass allowedTypes to MediaPlaceholder #276

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

benlk
Copy link
Contributor

@benlk benlk commented Nov 15, 2023

Description of the Change

This PR:

  • allows the Image component to enforce the use of a specific file type
  • updates docs to add instructions
  • updates example code to use this parameter

Closes #239

How to test the Change

Use the sample code provided in the Image component README. Verify that it does not accept, via upload or picking from the library, a file which is not a .gif.

Changelog Entry

Added - Image component now supports specifying filetype via allowedTypes

Credits

Props @benlk

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

Copy link

Size Change: +63 B (0%)

Total Size: 65.3 kB

Filename Size Change
dist/index.js 65.3 kB +63 B (0%)

compressed-size-action

Copy link
Member

@fabiankaegy fabiankaegy left a comment

Choose a reason for hiding this comment

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

This is a great addition :) Thanks!

@fabiankaegy fabiankaegy merged commit 5967f22 into develop Nov 16, 2023
3 of 6 checks passed
@fabiankaegy fabiankaegy deleted the fix/239-allowedTypes-mediaPlaceholder branch November 16, 2023 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Image component: pass allowedTypes to MediaPlaceholder
2 participants