You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
631 B
28 lines
631 B
import { PropsWithChildren } from "react";
|
|
import { Text } from "react-native";
|
|
|
|
type props = PropsWithChildren & {
|
|
center?: boolean;
|
|
color?: string;
|
|
size?: string;
|
|
bold?: boolean;
|
|
isLink?: boolean;
|
|
};
|
|
|
|
const CustomText = ({ children, center, color, size, bold, isLink }: props) => {
|
|
const className =
|
|
"text-" +
|
|
(size ?? "md") +
|
|
" " +
|
|
(center ? "text-center" : "") +
|
|
" " +
|
|
("text-" + (color ?? "black ")) +
|
|
" " +
|
|
(bold ? "font-bold" : "") +
|
|
" " +
|
|
(isLink ? "text-orange-500 underline" : "");
|
|
return <Text className={className}>{children}</Text>;
|
|
};
|
|
|
|
export default CustomText;
|