Add new filter action to blur media (#34256)
This commit is contained in:
parent
2a181f56e3
commit
c93b2c6809
11 changed files with 46 additions and 11 deletions
|
@ -226,6 +226,7 @@ class MediaGallery extends PureComponent {
|
|||
visible: PropTypes.bool,
|
||||
autoplay: PropTypes.bool,
|
||||
onToggleVisibility: PropTypes.func,
|
||||
matchedFilters: PropTypes.arrayOf(PropTypes.string),
|
||||
};
|
||||
|
||||
state = {
|
||||
|
@ -296,7 +297,7 @@ class MediaGallery extends PureComponent {
|
|||
}
|
||||
|
||||
render () {
|
||||
const { media, lang, sensitive, defaultWidth, autoplay } = this.props;
|
||||
const { media, lang, sensitive, defaultWidth, autoplay, matchedFilters } = this.props;
|
||||
const { visible } = this.state;
|
||||
const width = this.state.width || defaultWidth;
|
||||
|
||||
|
@ -323,7 +324,7 @@ class MediaGallery extends PureComponent {
|
|||
<div className={`media-gallery media-gallery--layout-${size}`} style={style} ref={this.handleRef}>
|
||||
{children}
|
||||
|
||||
{(!visible || uncached) && <SpoilerButton uncached={uncached} sensitive={sensitive} onClick={this.handleOpen} />}
|
||||
{(!visible || uncached) && <SpoilerButton uncached={uncached} sensitive={sensitive} onClick={this.handleOpen} matchedFilters={matchedFilters} />}
|
||||
|
||||
{(visible && !uncached) && (
|
||||
<div className='media-gallery__actions'>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue