mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-14 03:42:30 +00:00
Grow features/settings from features/app-settings and features/settings-menu
This commit is contained in:
49
react/features/settings/components/native/BackButton.js
Normal file
49
react/features/settings/components/native/BackButton.js
Normal file
@@ -0,0 +1,49 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { TouchableOpacity } from 'react-native';
|
||||
|
||||
import { Icon } from '../../../base/font-icons';
|
||||
import { Header } from '../../../base/react';
|
||||
|
||||
/**
|
||||
* The type of the React {@code Component} props of {@link BackButton}
|
||||
*/
|
||||
type Props = {
|
||||
|
||||
/**
|
||||
* The action to be performed when the button is pressed.
|
||||
*/
|
||||
onPress: Function,
|
||||
|
||||
/**
|
||||
* An external style object passed to the component.
|
||||
*/
|
||||
style?: Object
|
||||
};
|
||||
|
||||
/**
|
||||
* A component rendering a back button.
|
||||
*/
|
||||
export default class BackButton extends Component<Props> {
|
||||
/**
|
||||
* Implements React's {@link Component#render()}, renders the button.
|
||||
*
|
||||
* @inheritdoc
|
||||
* @returns {ReactElement}
|
||||
*/
|
||||
render() {
|
||||
return (
|
||||
<TouchableOpacity
|
||||
accessibilityLabel = { 'Back' }
|
||||
onPress = { this.props.onPress }>
|
||||
<Icon
|
||||
name = { 'arrow_back' }
|
||||
style = { [
|
||||
Header.buttonStyle,
|
||||
this.props.style
|
||||
] } />
|
||||
</TouchableOpacity>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user