// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import { storiesOf } from '@storybook/react'; import enMessages from '../../_locales/en/messages.json'; import { setupI18n } from '../util/setupI18n'; import { TextAttachment } from './TextAttachment'; import type { PropsType } from './TextAttachment'; const i18n = setupI18n('en', enMessages); const getDefaultProps = (): PropsType => ({ i18n, textAttachment: {}, }); const story = storiesOf('Components/TextAttachment', module); story.add('Solid bg + text bg', () => ( )); story.add('Gradient', () => ( )); story.add('Text with line breaks (condensed font)', () => ( )); story.add('Text with line breaks + Autowrap (serif font)', () => ( )); story.add('Autowrap text', () => ( )); story.add('Romeo & Juliet', () => ( )); story.add('Overflow newline numbers', () => ( )); story.add('Character wrap (bold)', () => ( )); story.add('Mix of newlines, overflow, autowrap', () => ( )); story.add('Link preview', () => ( > Careers', // TODO add image }, }} /> )); story.add('Link preview (long title)', () => ( )); story.add('Link preview (just url)', () => ( )); story.add('Link preview (just url + text)', () => ( )); story.add('Link preview (really long domain)', () => ( )); story.add('Link Preview w/ R&J', () => ( ));