import React from 'react';
import { ScrollView } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import MessageComponent from './Message';
import { E2E_MESSAGE_TYPE, messagesStatus, themes } from '../../lib/constants';
import MessageSeparator from '../../views/RoomView/Separator';
import MessageContext from './Context';
const _theme = 'light';
const user = {
id: 'y8bd77ptZswPj3EW8',
username: 'diego.mello',
token: 'abc'
};
const author = {
_id: 'userid',
username: 'diego.mello'
};
const longNameAuthor = {
_id: 'userid',
username: 'Long name user looooong name user'
};
const baseUrl = 'https://open.rocket.chat';
const date = new Date(2017, 10, 10, 10);
const longText =
'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.';
const getCustomEmoji = (content: string) => {
const customEmoji = {
marioparty: { name: content, extension: 'gif' },
react_rocket: { name: content, extension: 'png' },
nyan_rocket: { name: content, extension: 'png' }
}[content];
return customEmoji;
};
export default {
title: 'Message',
decorators: [
(Story: any) => (
{},
onLongPress: () => {},
reactionInit: () => {},
onErrorPress: () => {},
replyBroadcast: () => {},
onReactionPress: () => {},
onDiscussionPress: () => {},
onReactionLongPress: () => {},
threadBadgeColor: themes.light.tunreadColor
}}
>
)
]
};
export const Message = (props: any) => (
);
export const Basic = () => (
<>
>
);
export const GroupedMessages = () => (
<>
>
);
export const WithoutHeader = () => ;
export const WithAlias = () => (
<>
>
);
export const Edited = () => (
<>
>
);
export const Encrypted = () => (
<>
{}}
type='e2e'
/>
alert('Error pressed')}
type='e2e'
/>
>
);
export const BlockQuote = () => (
<>
Testing block quote\nTesting block quote'} />
>
);
export const Lists = () => (
<>
>
);
export const StaticAvatar = () => (
);
export const FullName = () => (
);
export const Mentions = () => (
<>
>
);
export const Emojis = () => (
<>
>
);
export const TimeFormat = () => ;
export const Reactions = () => (
<>
{}}
/>
{}}
/>
>
);
export const DateAndUnreadSeparators = () => (
<>
>
);
export const WithImage = () => (
<>
>
);
export const WithVideo = () => (
<>
>
);
export const WithAudio = () => (
<>
>
);
export const WithFile = () => (
<>
>
);
export const MessageWithReply = () => (
<>
>
);
export const MessageWithReadReceipt = () => (
<>
>
);
export const MessageWithThread = () => (
<>
>
);
export const SequentialThreadMessagesFollowingThreadButton = () => (
<>
>
);
export const SequentialThreadMessagesFollowingThreadReply = () => (
<>
>
);
export const Discussion = () => (
<>
>
);
export const URL = () => (
<>
>
);
export const URLImagePreview = () => (
<>
>
);
export const CustomFields = () => (
<>
>
);
export const TwoShortCustomFieldsWithMarkdown = () => (
);
export const ColoredAttachments = () => (
);
export const Broadcast = () => alert('broadcast!')} />;
export const Archived = () => ;
export const Error = () => (
<>
alert('Error pressed')} />
alert('Error pressed')}
isHeader={false}
/>
>
);
export const Temp = () => ;
export const Editing = () => ;
export const SystemMessages = () => (
<>
>
);
export const Ignored = () => ;
export const CustomStyle = () => ;
export const ShowButtonAsAttachment = () => (
<>
>
);
export const ThumbnailFromServer = () => (
);
export const LongNameUser = () => (
<>
>
);