12345678910111213141516171819202122232425262728293031323334 |
- import React, { memo } from 'react';
- import { StyleSheet } from 'react-native';
- import { Button as PaperButton } from 'react-native-paper';
- import { theme } from '../core/theme';
- const Button = ({ mode, style, children, ...props }) => (
- <PaperButton
- style={[
- styles.button,
- mode === 'outlined' && { backgroundColor: theme.colors.surface },
- style,
- ]}
- labelStyle={styles.text}
- mode={mode}
- {...props}
- >
- {children}
- </PaperButton>
- );
- const styles = StyleSheet.create({
- button: {
- width: '100%',
- marginVertical: 10,
- },
- text: {
- fontWeight: 'bold',
- fontSize: 15,
- lineHeight: 26,
- },
- });
- export default memo(Button);
|