-
-
Notifications
You must be signed in to change notification settings - Fork 180
Expand file tree
/
Copy pathChatMessageReactions.stories.tsx
More file actions
59 lines (52 loc) · 1.41 KB
/
ChatMessageReactions.stories.tsx
File metadata and controls
59 lines (52 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import type { Meta, StoryObj } from '@storybook/react-native';
import { View, StyleSheet } from 'react-native';
import { ChatReactions, ChatReactionsProps, ChatBubble } from './ChatComponents';
const ReactionsDemo = (props: ChatReactionsProps) => (
<View style={styles.container}>
<ChatBubble
message="Tap the reactions below to toggle them!"
isOwn={false}
timestamp="4:20 PM"
/>
<View style={styles.reactionsWrapper}>
<ChatReactions {...props} />
</View>
</View>
);
const styles = StyleSheet.create({
container: {
padding: 16,
backgroundColor: '#FFFFFF',
borderRadius: 12,
},
reactionsWrapper: {
marginTop: 4,
marginLeft: 8,
},
});
const meta = {
title: 'NestingExample/Message/Reactions',
component: ReactionsDemo,
tags: ['chat', 'reactions'],
} satisfies Meta<ChatReactionsProps>;
export default meta;
type Story = StoryObj<typeof meta>;
export const MessageOne: Story = {
args: {
reactions: [
{ emoji: '❤️', count: 12, reacted: true },
{ emoji: '😂', count: 8, reacted: false },
{ emoji: '👍', count: 4, reacted: true },
{ emoji: '🎉', count: 2, reacted: false },
],
},
};
export const MessageTwo: Story = {
args: {
reactions: [
{ emoji: '🔥', count: 23, reacted: false },
{ emoji: '💯', count: 15, reacted: true },
{ emoji: '👀', count: 7, reacted: false },
],
},
};