Skip to content

The open alternative to Salesforce, designed for AI.

1.3 KB
Raw Blame
import { useState } from 'react';
import { defineFrontComponent } from 'twenty-sdk/define';
import { Callout } from 'twenty-ui/components/feedback';
import { ListItem } from 'twenty-ui/primitives/navigation';

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

const LabelOverrides = () => {
  const [isSuppliedVisible, setIsSuppliedVisible] = useState(true);
  return (
    <TwentyUiGalleryCard title="Label overrides">
      <Callout status="info" title="Default notice" onDismiss={() => {}} />
      {isSuppliedVisible && (
        <Callout
          status="info"
          title="Supplied notice"
          onDismiss={() => setIsSuppliedVisible(false)}
          closeLabel="Dismiss notice"
        />
      )}
      <ListItem shortcut={[['G'], ['D']]}>Default shortcut</ListItem>
      <ListItem shortcut={[['G'], ['S']]} shortcutJoinLabel="followed by">
        Supplied shortcut
      </ListItem>
      <ListItem shortcut={[['G'], ['L']]} shortcutJoinLabel="next">
        Sequential shortcut
      </ListItem>
    </TwentyUiGalleryCard>
  );
};

export default defineFrontComponent({
  universalIdentifier: '5fbc0790-28ac-4d43-9e43-ea246f0da4da',
  name: 'twenty-ui-label-overrides',
  description:
    'Caller-owned text and accessible names in both renderer runtimes',
  component: LabelOverrides,
});