Story - add caption

This commit is contained in:
Alvaro 2022-10-04 17:17:15 -06:00 committed by GitHub
parent 8fcd36e30a
commit c52fe3f377
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 688 additions and 163 deletions

View file

@ -9,6 +9,7 @@ import { MediaEditor } from './MediaEditor';
import enMessages from '../../_locales/en/messages.json';
import { setupI18n } from '../util/setupI18n';
import { Stickers, installedPacks } from '../test-both/helpers/getStickerPacks';
import { CompositionTextArea } from './CompositionTextArea';
const i18n = setupI18n('en', enMessages);
@ -47,3 +48,20 @@ export const Smol = (): JSX.Element => (
export const Portrait = (): JSX.Element => (
<MediaEditor {...getDefaultProps()} imageSrc={IMAGE_4} />
);
export const WithCaption = (): JSX.Element => (
<MediaEditor
{...getDefaultProps()}
supportsCaption
renderCompositionTextArea={props => (
<CompositionTextArea
{...props}
i18n={i18n}
onPickEmoji={action('onPickEmoji')}
onSetSkinTone={action('onSetSkinTone')}
onTextTooLong={action('onTextTooLong')}
getPreferredBadge={() => undefined}
/>
)}
/>
);