import {Text} from '@gluestack-ui/themed';

interface MyTitleProps {
  text: string;
  textAlign?: 'left' | 'center' | 'right';
  paddingBottom?: number;
}

export function MyTitle({text, textAlign, paddingBottom}: MyTitleProps) {
  return (
    <Text
      size="2xl"
      bold
      style={{
        textAlign: textAlign ?? 'center',
        paddingBottom: paddingBottom ?? 20,
      }}>
      {text}
    </Text>
  );
}
