add word break in setting tile title and description

This commit is contained in:
Ajay Bura 2024-12-26 20:10:28 +05:30
parent 17727decc3
commit c1ef616409

View file

@ -1,5 +1,6 @@
import React, { ReactNode } from 'react';
import { Box, Text } from 'folds';
import { BreakWord } from '../../styles/Text.css';
type SettingTileProps = {
title?: ReactNode;
@ -13,9 +14,13 @@ export function SettingTile({ title, description, before, after, children }: Set
<Box alignItems="Center" gap="300">
{before && <Box shrink="No">{before}</Box>}
<Box grow="Yes" direction="Column" gap="100">
{title && <Text size="T300">{title}</Text>}
{title && (
<Text className={BreakWord} size="T300">
{title}
</Text>
)}
{description && (
<Text size="T200" priority="300">
<Text className={BreakWord} size="T200" priority="300">
{description}
</Text>
)}