-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mobile] - Cover block - Media editing (#23280)
* Mobile - Cover block - Media editing * Mobile - Cover block - Fix upload placeholder * Mobile - Cover media editing - Image edit button * Mobile - Image editing button - Check for url before rendering * Mobile - Cover - Show selected border with the overlay layer * Mobile - Cover - Style improvements, Media editing support for onRemove * Mobile - Cover - Remove extra line in style * Mobile - Media editing - Support for more picker options * Mobile - Cover - Update clear media label * Mobile - Media Edit - Check if optionSelected is defined * Mobile - Cover - Don't show the full screen modal preview if there is not a url set * Mobile - Update release notes * Mobile - Update changelog
- Loading branch information
Gerardo Pacheco
authored
Jul 24, 2020
1 parent
5cef528
commit 8805fa5
Showing
12 changed files
with
243 additions
and
142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
packages/components/src/mobile/image-with-focalpoint/style.native.scss
This file was deleted.
Oops, something went wrong.
48 changes: 48 additions & 0 deletions
48
packages/components/src/mobile/image/image-editing-button.native.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { TouchableWithoutFeedback, View } from 'react-native'; | ||
|
||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { Icon } from '@wordpress/components'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import { MediaEdit } from '../media-edit'; | ||
import SvgIconCustomize from './icon-customize'; | ||
import styles from './style.scss'; | ||
|
||
const ImageEditingButton = ( { | ||
onSelectMediaUploadOption, | ||
openMediaOptions, | ||
pickerOptions, | ||
url, | ||
} ) => { | ||
return ( | ||
<MediaEdit | ||
onSelect={ onSelectMediaUploadOption } | ||
source={ { uri: url } } | ||
openReplaceMediaOptions={ openMediaOptions } | ||
render={ ( { open, mediaOptions } ) => ( | ||
<TouchableWithoutFeedback onPress={ open }> | ||
<View style={ styles.editContainer }> | ||
<View style={ styles.edit }> | ||
{ mediaOptions() } | ||
<Icon | ||
size={ 16 } | ||
icon={ SvgIconCustomize } | ||
{ ...styles.iconCustomise } | ||
/> | ||
</View> | ||
</View> | ||
</TouchableWithoutFeedback> | ||
) } | ||
pickerOptions={ pickerOptions } | ||
/> | ||
); | ||
}; | ||
|
||
export default ImageEditingButton; |
Oops, something went wrong.