Upgrade react and storybook
This commit is contained in:
parent
6476a4fe73
commit
42eb4013d0
244 changed files with 15341 additions and 10249 deletions
|
@ -2,7 +2,6 @@
|
|||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
import * as React from 'react';
|
||||
import { storiesOf } from '@storybook/react';
|
||||
import { action } from '@storybook/addon-actions';
|
||||
import { boolean, select, text } from '@storybook/addon-knobs';
|
||||
|
||||
|
@ -118,11 +117,13 @@ const createProps = (storyProps: Partial<PropsType> = {}): PropsType => ({
|
|||
toggleSpeakerView: action('toggle-speaker-view'),
|
||||
});
|
||||
|
||||
const story = storiesOf('Components/CallManager', module);
|
||||
export default {
|
||||
title: 'Components/CallManager',
|
||||
};
|
||||
|
||||
story.add('No Call', () => <CallManager {...createProps()} />);
|
||||
export const NoCall = (): JSX.Element => <CallManager {...createProps()} />;
|
||||
|
||||
story.add('Ongoing Direct Call', () => (
|
||||
export const OngoingDirectCall = (): JSX.Element => (
|
||||
<CallManager
|
||||
{...createProps({
|
||||
activeCall: {
|
||||
|
@ -136,9 +137,9 @@ story.add('Ongoing Direct Call', () => (
|
|||
},
|
||||
})}
|
||||
/>
|
||||
));
|
||||
);
|
||||
|
||||
story.add('Ongoing Group Call', () => (
|
||||
export const OngoingGroupCall = (): JSX.Element => (
|
||||
<CallManager
|
||||
{...createProps({
|
||||
activeCall: {
|
||||
|
@ -156,9 +157,9 @@ story.add('Ongoing Group Call', () => (
|
|||
},
|
||||
})}
|
||||
/>
|
||||
));
|
||||
);
|
||||
|
||||
story.add('Ringing (direct call)', () => (
|
||||
export const RingingDirectCall = (): JSX.Element => (
|
||||
<CallManager
|
||||
{...createProps({
|
||||
incomingCall: {
|
||||
|
@ -168,9 +169,13 @@ story.add('Ringing (direct call)', () => (
|
|||
},
|
||||
})}
|
||||
/>
|
||||
));
|
||||
);
|
||||
|
||||
story.add('Ringing (group call)', () => (
|
||||
RingingDirectCall.story = {
|
||||
name: 'Ringing (direct call)',
|
||||
};
|
||||
|
||||
export const RingingGroupCall = (): JSX.Element => (
|
||||
<CallManager
|
||||
{...createProps({
|
||||
incomingCall: {
|
||||
|
@ -188,9 +193,13 @@ story.add('Ringing (group call)', () => (
|
|||
},
|
||||
})}
|
||||
/>
|
||||
));
|
||||
);
|
||||
|
||||
story.add('Call Request Needed', () => (
|
||||
RingingGroupCall.story = {
|
||||
name: 'Ringing (group call)',
|
||||
};
|
||||
|
||||
export const CallRequestNeeded = (): JSX.Element => (
|
||||
<CallManager
|
||||
{...createProps({
|
||||
activeCall: {
|
||||
|
@ -205,9 +214,9 @@ story.add('Call Request Needed', () => (
|
|||
},
|
||||
})}
|
||||
/>
|
||||
));
|
||||
);
|
||||
|
||||
story.add('Group call - Safety Number Changed', () => (
|
||||
export const GroupCallSafetyNumberChanged = (): JSX.Element => (
|
||||
<CallManager
|
||||
{...createProps({
|
||||
activeCall: {
|
||||
|
@ -231,4 +240,8 @@ story.add('Group call - Safety Number Changed', () => (
|
|||
},
|
||||
})}
|
||||
/>
|
||||
));
|
||||
);
|
||||
|
||||
GroupCallSafetyNumberChanged.story = {
|
||||
name: 'Group call - Safety Number Changed',
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue