Files
lnreader/src/components/Button/Button.tsx
T
Rajarshee Chatterjee 84a2561c41 Minor Fixes
2023-02-18 14:02:04 +05:30

24 lines
493 B
TypeScript

import React from 'react';
import {
Button as PaperButton,
ButtonProps as PaperButtonProps,
} from 'react-native-paper';
import { useTheme } from '@hooks';
interface ButtonProps extends Omit<PaperButtonProps, 'children' | 'theme'> {
title?: string;
}
const Button: React.FC<ButtonProps> = props => {
const theme = useTheme();
return (
<PaperButton {...props} theme={{ colors: theme }}>
{props.title || props.children}
</PaperButton>
);
};
export default Button;