Adds keyboard support to the media quality selector

This commit is contained in:
Josh Perez 2021-07-07 13:05:03 -04:00 committed by GitHub
parent 3827f05db9
commit a73d7b42cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 57 additions and 3 deletions

View file

@ -7,6 +7,7 @@ import { storiesOf } from '@storybook/react';
import { action } from '@storybook/addon-actions';
import { boolean } from '@storybook/addon-knobs';
import { IMAGE_JPEG } from '../types/MIME';
import { CompositionArea, Props } from './CompositionArea';
import { setup as setupI18n } from '../../js/modules/i18n';
import enMessages from '../../_locales/en/messages.json';
@ -33,7 +34,7 @@ const createProps = (overrideProps: Partial<Props> = {}): Props => ({
micCellEl,
onChooseAttachment: action('onChooseAttachment'),
// AttachmentList
draftAttachments: [],
draftAttachments: overrideProps.draftAttachments || [],
onAddAttachment: action('onAddAttachment'),
onClearAttachments: action('onClearAttachments'),
onClickAttachment: action('onClickAttachment'),
@ -144,3 +145,15 @@ story.add('SMS-only', () => {
return <CompositionArea {...props} />;
});
story.add('Attachments', () => {
const props = createProps({
draftAttachments: [
{
contentType: IMAGE_JPEG,
},
],
});
return <CompositionArea {...props} />;
});