xref: /MusicFree/src/components/base/button.tsx (revision 2aa881935ca35b8fb1abc4206e0dc35149231456)
1import {ColorKey} from '@/constants/uiConst';
2import React from 'react';
3import {Button} from 'react-native-paper';
4import ThemeText from './themeText';
5
6interface IButtonProps {
7    children: string;
8    fontColor?: ColorKey;
9    onPress?: () => void;
10}
11export default function (props: IButtonProps) {
12    const {children, onPress, fontColor} = props;
13    return (
14        <Button {...props} onPress={onPress}>
15            <ThemeText fontColor={fontColor}>{children}</ThemeText>
16        </Button>
17    );
18}
19