-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* rnmobile: Implement image settings button using InspectorControls.Slot pattern. * rnmobile: Add missing semicolon * rnmobile: Adding bottom-sheet component to mobile * rnmobile: Styling bottom-sheet header * rnmobile: Bottom-sheet clean up * rnmobile: Fix lint issues on bottom-sheet related code. * rnmobile: Fix small lint issues * rnmobile: Move inline toolbar button definition out of constant. * rnmobile: Remove extra white-spaces * revert package-lock.json changes * rnmobile: Fix merge issue * rnmobile: Imported BaseControl and TextinputControl to be used on Alt Image Settings * rnmobile: exporting component BottomSheet.Button to be used as bottom-sheet header buttons * rnmobile: Adding BottomSheet.Cell component as an extraction for BottomSheet users. * Fix lint issues * Reverting changes to package-lock.json * Fix merge issues * Remove Done button from Image settings bottom sheet * Make bottom-sheet avoid being behind keyboard * Fix lint issues * Making BottomSheet.Cell value editable as textinput. * Remove unnecesary onPress prop from Alt cell. * Fix lint issues
- Loading branch information
1 parent
9381d47
commit 3a2d9f2
Showing
7 changed files
with
94 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { Text, View } from 'react-native'; | ||
|
||
export default function BaseControl( { label, help, children } ) { | ||
return ( | ||
<View | ||
accessible={ true } | ||
accessibilityLabel={ label } | ||
> | ||
{ label && <Text>{ label }</Text> } | ||
{ children } | ||
{ help && <Text>{ help }</Text> } | ||
</View> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import { TextInput } from 'react-native'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import BaseControl from '../base-control'; | ||
|
||
function TextareaControl( { label, value, help, onChange, rows = 4 } ) { | ||
return ( | ||
<BaseControl label={ label } help={ help } > | ||
<TextInput | ||
style={ { height: 80, borderColor: 'gray', borderWidth: 1 } } | ||
value={ value } | ||
onChangeText={ onChange } | ||
numberOfLines={ rows } | ||
multiline={ rows > 1 } | ||
textAlignVertical="top" | ||
/> | ||
</BaseControl> | ||
); | ||
} | ||
|
||
export default TextareaControl; |
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