2021-05-20 21:54:03 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import { action } from '@storybook/addon-actions';
|
|
|
|
|
2021-10-26 19:15:33 +00:00
|
|
|
import type { PropsType } from './CallingSelectPresentingSourcesModal';
|
|
|
|
import { CallingSelectPresentingSourcesModal } from './CallingSelectPresentingSourcesModal';
|
2021-05-20 21:54:03 +00:00
|
|
|
|
2021-09-18 00:30:08 +00:00
|
|
|
import { setupI18n } from '../util/setupI18n';
|
2021-05-20 21:54:03 +00:00
|
|
|
import enMessages from '../../_locales/en/messages.json';
|
|
|
|
|
|
|
|
const i18n = setupI18n('en', enMessages);
|
|
|
|
|
|
|
|
const createProps = (): PropsType => ({
|
|
|
|
i18n,
|
|
|
|
presentingSourcesAvailable: [
|
|
|
|
{
|
|
|
|
id: 'screen',
|
|
|
|
name: 'Entire Screen',
|
2021-06-03 19:52:11 +00:00
|
|
|
isScreen: true,
|
2021-05-20 21:54:03 +00:00
|
|
|
thumbnail:
|
|
|
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+P/1PwAF8AL1sEVIPAAAAABJRU5ErkJggg==',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'window:123',
|
|
|
|
name: 'Bozirro Airhorse',
|
2021-06-03 19:52:11 +00:00
|
|
|
isScreen: false,
|
2021-05-20 21:54:03 +00:00
|
|
|
thumbnail:
|
|
|
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z1D4HwAF5wJxzsNOIAAAAABJRU5ErkJggg==',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'window:456',
|
|
|
|
name: 'Discoverer',
|
2021-06-03 19:52:11 +00:00
|
|
|
isScreen: false,
|
2021-05-20 21:54:03 +00:00
|
|
|
thumbnail:
|
|
|
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8HwHwAFHQIIj4yLtgAAAABJRU5ErkJggg==',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'window:789',
|
|
|
|
name: 'Signal Beta',
|
2021-06-03 19:52:11 +00:00
|
|
|
isScreen: false,
|
2021-05-20 21:54:03 +00:00
|
|
|
thumbnail: '',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
id: 'window:xyz',
|
|
|
|
name: 'Window that has a really long name and overflows',
|
2021-06-03 19:52:11 +00:00
|
|
|
isScreen: false,
|
2021-05-20 21:54:03 +00:00
|
|
|
thumbnail:
|
|
|
|
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+O/wHwAEhgJAyqFnAgAAAABJRU5ErkJggg==',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
setPresenting: action('set-presenting'),
|
|
|
|
});
|
|
|
|
|
2022-06-07 00:48:02 +00:00
|
|
|
export default {
|
|
|
|
title: 'Components/CallingSelectPresentingSourcesModal',
|
|
|
|
};
|
2021-05-20 21:54:03 +00:00
|
|
|
|
2022-11-18 00:45:19 +00:00
|
|
|
export function Modal(): JSX.Element {
|
2021-05-20 21:54:03 +00:00
|
|
|
return <CallingSelectPresentingSourcesModal {...createProps()} />;
|
2022-11-18 00:45:19 +00:00
|
|
|
}
|