text stuff

This commit is contained in:
Violet Caulfield
2024-12-29 08:38:00 -06:00
parent af94e1116a
commit 16b25f4e64
2 changed files with 7 additions and 1 deletions

View File

@@ -83,13 +83,17 @@ export function Card(props: CardProps) {
width={dimensions.width}
>
<H5
textAlign="center"
lineBreakStrategyIOS="standard"
numberOfLines={1}
>
{ props.caption }
</H5>
{ props.subCaption && (
<Text>
<Text
textAlign="center"
>
{ props.subCaption }
</Text>
)}

View File

@@ -28,6 +28,7 @@ interface TextProps {
bold?: boolean | undefined
children: string;
width?: number;
textAlign?: "left" | "right" | "unset" | "auto" | "center" | "justify" | undefined;
}
export function Text(props: TextProps): React.JSX.Element {
@@ -35,6 +36,7 @@ export function Text(props: TextProps): React.JSX.Element {
<Paragraph
width={props.width}
fontWeight={props.bold ? 800 : 600}
textAlign={props.textAlign}
fontSize="$4"
lineBreakMode="clip"
>