Skip to content

The open alternative to Salesforce, designed for AI.

1.0 KB
Raw Blame
import { defineFrontComponent } from 'twenty-sdk/define';
import { Text } from 'twenty-ui/primitives/typography';

import { TwentyUiGalleryCard } from '@/__stories__/shared/front-components/twenty-ui-gallery-card';

const DisplayHelpers = () => (
  <TwentyUiGalleryCard title="Text and display helpers">
    <Text render={<p />} truncate style={{ width: 160 }}>
      A long account name that should truncate
    </Text>
    <Text lineClamp={2} style={{ width: 160 }}>
      A longer account description that spans several lines and should be
      clamped to two lines.
    </Text>
    <Text truncate style={{ maxWidth: 120 }}>
      An overflowing reference number
    </Text>
    <Text truncate>1234.5</Text>
    <Text truncate>{'{"active":true}'}</Text>
    <Text truncate>Account description</Text>
  </TwentyUiGalleryCard>
);

export default defineFrontComponent({
  universalIdentifier: '4d23e9af-7cb3-4e4a-bbca-8e960f840002',
  name: 'twenty-ui-display-helpers',
  description: 'Text and migrated display helpers in the sandbox',
  component: DisplayHelpers,
});