2
0

fix: 💄 1-line truncated texts

This commit is contained in:
Baptiste Arnaud
2022-06-18 07:58:51 +02:00
parent 283509ed59
commit e4ad23c2b9
14 changed files with 15 additions and 15 deletions

View File

@ -4,7 +4,7 @@ import { Text } from '@chakra-ui/react'
type Props = { label?: string }
export const ConfigureContent = ({ label }: Props) => (
<Text color={label ? 'currentcolor' : 'gray.500'} noOfLines={0}>
<Text color={label ? 'currentcolor' : 'gray.500'} noOfLines={1}>
{label ?? 'Configure...'}
</Text>
)

View File

@ -6,7 +6,7 @@ type Props = {
}
export const FileInputContent = ({ options: { isMultipleAllowed } }: Props) => (
<Text noOfLines={0} pr="6">
<Text noOfLines={1} pr="6">
Collect {isMultipleAllowed ? 'files' : 'file'}
</Text>
)

View File

@ -13,7 +13,7 @@ export const PaymentInputContent = ({ block }: Props) => {
)
return <Text color="gray.500">Configure...</Text>
return (
<Text noOfLines={0} pr="6">
<Text noOfLines={1} pr="6">
Collect {block.options.amount} {block.options.currency}
</Text>
)

View File

@ -6,7 +6,7 @@ type Props = {
}
export const RatingInputContent = ({ block }: Props) => (
<Text noOfLines={0} pr="6">
<Text noOfLines={1} pr="6">
Rate from 1 to {block.options.length}
</Text>
)

View File

@ -36,7 +36,7 @@ export const ProviderWebhookContent = ({ block, configuredLabel }: Props) => {
if (isNotDefined(webhook?.body))
return <Text color="gray.500">Configure...</Text>
return (
<Text noOfLines={0} pr="6">
<Text noOfLines={1} pr="6">
{webhook?.url ? configuredLabel : 'Disabled'}
</Text>
)

View File

@ -22,7 +22,7 @@ export const ConditionNodeContent = ({ item }: Props) => {
byId(comparison.variableId)
)
return (
<Wrap key={comparison.id} spacing={1} noOfLines={0}>
<Wrap key={comparison.id} spacing={1} noOfLines={1}>
{idx > 0 && <Text>{item.content.logicalOperator ?? ''}</Text>}
{variable?.name && (
<Tag bgColor="orange.400" color="white">
@ -38,7 +38,7 @@ export const ConditionNodeContent = ({ item }: Props) => {
)}
{comparison?.value && (
<Tag bgColor={'gray.200'}>
<Text noOfLines={0}>{comparison.value}</Text>
<Text noOfLines={1}>{comparison.value}</Text>
</Tag>
)}
</Wrap>