Redux state: Allow multiple calls to be stored
This commit is contained in:
parent
753e0279c6
commit
3468de255d
21 changed files with 1191 additions and 515 deletions
|
@ -15,11 +15,13 @@ const i18n = setupI18n('en', enMessages);
|
|||
|
||||
const defaultProps = {
|
||||
acceptCall: action('accept-call'),
|
||||
callDetails: {
|
||||
call: {
|
||||
conversationId: 'fake-conversation-id',
|
||||
callId: 0,
|
||||
isIncoming: true,
|
||||
isVideoCall: true,
|
||||
|
||||
},
|
||||
conversation: {
|
||||
id: '3051234567',
|
||||
avatarPath: undefined,
|
||||
contactColor: 'ultramarine' as ColorType,
|
||||
|
@ -33,24 +35,15 @@ const defaultProps = {
|
|||
};
|
||||
|
||||
const permutations = [
|
||||
{
|
||||
title: 'Incoming Call Bar (no call details)',
|
||||
props: {},
|
||||
},
|
||||
{
|
||||
title: 'Incoming Call Bar (video)',
|
||||
props: {
|
||||
callDetails: {
|
||||
...defaultProps.callDetails,
|
||||
isVideoCall: true,
|
||||
},
|
||||
},
|
||||
props: {},
|
||||
},
|
||||
{
|
||||
title: 'Incoming Call Bar (audio)',
|
||||
props: {
|
||||
callDetails: {
|
||||
...defaultProps.callDetails,
|
||||
call: {
|
||||
...defaultProps.call,
|
||||
isVideoCall: false,
|
||||
},
|
||||
},
|
||||
|
@ -69,10 +62,13 @@ storiesOf('Components/IncomingCallBar', module)
|
|||
return (
|
||||
<IncomingCallBar
|
||||
{...defaultProps}
|
||||
callDetails={{
|
||||
...defaultProps.callDetails,
|
||||
color,
|
||||
call={{
|
||||
...defaultProps.call,
|
||||
isVideoCall,
|
||||
}}
|
||||
conversation={{
|
||||
...defaultProps.conversation,
|
||||
color,
|
||||
name,
|
||||
}}
|
||||
/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue