react-native-gifted-chat 2.8.2-alpha.4 → 2.9.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. package/CHANGELOG_2.8.1_to_2.8.2-alpha.5.md +374 -0
  2. package/README.md +26 -26
  3. package/package.json +2 -1
  4. package/src/Actions.tsx +1 -1
  5. package/src/Bubble/index.tsx +12 -14
  6. package/src/Bubble/styles.ts +1 -1
  7. package/src/Bubble/types.ts +4 -5
  8. package/src/Color.ts +1 -1
  9. package/src/Composer.tsx +1 -1
  10. package/src/Day/styles.ts +1 -1
  11. package/src/GiftedAvatar.tsx +1 -1
  12. package/src/GiftedChat/index.tsx +12 -49
  13. package/src/GiftedChat/types.ts +2 -2
  14. package/src/InputToolbar.tsx +22 -13
  15. package/src/LoadEarlierMessages.tsx +48 -51
  16. package/src/Message/index.tsx +6 -8
  17. package/src/MessageAudio.tsx +1 -1
  18. package/src/MessageContainer/components/DayAnimated/index.tsx +2 -3
  19. package/src/MessageContainer/components/Item/index.tsx +8 -10
  20. package/src/MessageContainer/index.tsx +9 -11
  21. package/src/MessageContainer/styles.ts +1 -1
  22. package/src/MessageText.tsx +2 -1
  23. package/src/MessageVideo.tsx +1 -1
  24. package/src/QuickReplies.tsx +1 -1
  25. package/src/Send.tsx +1 -1
  26. package/src/SystemMessage.tsx +30 -24
  27. package/src/Time.tsx +5 -5
  28. package/src/TypingIndicator/index.tsx +1 -3
  29. package/src/TypingIndicator/styles.ts +1 -1
  30. package/src/__tests__/Actions.test.tsx +1 -1
  31. package/src/__tests__/Avatar.test.tsx +7 -2
  32. package/src/__tests__/Bubble.test.tsx +3 -7
  33. package/src/__tests__/Color.test.tsx +1 -1
  34. package/src/__tests__/Composer.test.tsx +1 -1
  35. package/src/__tests__/Day.test.tsx +3 -3
  36. package/src/__tests__/DayAnimated.test.tsx +5 -11
  37. package/src/__tests__/GiftedAvatar.test.tsx +1 -1
  38. package/src/__tests__/GiftedChat.test.tsx +1 -1
  39. package/src/__tests__/InputToolbar.test.tsx +1 -1
  40. package/src/__tests__/LoadEarlier.test.tsx +2 -2
  41. package/src/__tests__/Message.test.tsx +5 -11
  42. package/src/__tests__/MessageContainer.test.tsx +4 -4
  43. package/src/__tests__/MessageImage.test.tsx +2 -2
  44. package/src/__tests__/MessageText.test.tsx +3 -2
  45. package/src/__tests__/Send.test.tsx +1 -1
  46. package/src/__tests__/SystemMessage.test.tsx +1 -1
  47. package/src/__tests__/Time.test.tsx +1 -1
  48. package/src/__tests__/__snapshots__/Actions.test.tsx.snap +61 -57
  49. package/src/__tests__/__snapshots__/Bubble.test.tsx.snap +1 -2
  50. package/src/__tests__/__snapshots__/Day.test.tsx.snap +96 -2
  51. package/src/__tests__/__snapshots__/GiftedChat.test.tsx.snap +56 -36
  52. package/src/__tests__/__snapshots__/InputToolbar.test.tsx.snap +1 -1
  53. package/src/__tests__/__snapshots__/LoadEarlier.test.tsx.snap +64 -52
  54. package/src/__tests__/__snapshots__/Message.test.tsx.snap +41 -5
  55. package/src/__tests__/__snapshots__/MessageText.test.tsx.snap +1 -2
  56. package/src/__tests__/__snapshots__/Send.test.tsx.snap +120 -108
  57. package/src/__tests__/__snapshots__/SystemMessage.test.tsx.snap +38 -8
  58. package/src/__tests__/data.ts +1 -1
  59. package/src/components/TouchableOpacity.tsx +26 -15
  60. package/src/index.ts +19 -1
  61. package/src/utils.ts +22 -1
  62. package/src/LoadEarlier.tsx +0 -95
package/src/Time.tsx CHANGED
@@ -2,7 +2,7 @@ import React, { useMemo } from 'react'
2
2
  import { StyleSheet, Text, View, ViewStyle, TextStyle } from 'react-native'
3
3
  import dayjs from 'dayjs'
4
4
 
5
- import Color from './Color'
5
+ import { Color } from './Color'
6
6
  import { TIME_FORMAT } from './Constant'
7
7
  import { useChatContext } from './GiftedChatContext'
8
8
  import { LeftRightStyle, IMessage } from './types'
@@ -51,23 +51,23 @@ export interface TimeProps<TMessage extends IMessage> {
51
51
  timeFormat?: string
52
52
  }
53
53
 
54
- export function Time<TMessage extends IMessage = IMessage> ({
54
+ export const Time = <TMessage extends IMessage = IMessage>({
55
55
  position = 'left',
56
56
  containerStyle,
57
57
  currentMessage,
58
58
  timeFormat = TIME_FORMAT,
59
59
  timeTextStyle,
60
- }: TimeProps<TMessage>) {
60
+ }: TimeProps<TMessage>) => {
61
61
  const { getLocale } = useChatContext()
62
62
 
63
63
  const formattedTime = useMemo(() => {
64
- if (currentMessage == null)
64
+ if (!currentMessage)
65
65
  return null
66
66
 
67
67
  return dayjs(currentMessage.createdAt).locale(getLocale()).format(timeFormat)
68
68
  }, [currentMessage, getLocale, timeFormat])
69
69
 
70
- if (currentMessage == null)
70
+ if (!currentMessage)
71
71
  return null
72
72
 
73
73
  return (
@@ -89,7 +89,7 @@ const DotsAnimation = () => {
89
89
  )
90
90
  }
91
91
 
92
- const TypingIndicator = ({ isTyping, style }: TypingIndicatorProps) => {
92
+ export const TypingIndicator = ({ isTyping, style }: TypingIndicatorProps) => {
93
93
  const yCoords = useSharedValue(200)
94
94
  const heightScale = useSharedValue(0)
95
95
  const marginScale = useSharedValue(0)
@@ -153,5 +153,3 @@ const TypingIndicator = ({ isTyping, style }: TypingIndicatorProps) => {
153
153
  </Animated.View>
154
154
  )
155
155
  }
156
-
157
- export default TypingIndicator
@@ -1,5 +1,5 @@
1
1
  import { StyleSheet } from 'react-native'
2
- import Color from '../Color'
2
+ import { Color } from '../Color'
3
3
 
4
4
  export default StyleSheet.create({
5
5
  container: {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Actions } from '../GiftedChat'
4
+ import { Actions } from '..'
5
5
 
6
6
  it('should render <Actions /> and compare with snapshot', () => {
7
7
  const { toJSON } = render(<Actions />)
@@ -1,11 +1,16 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Avatar } from '../GiftedChat'
4
+ import { Avatar } from '..'
5
+ import { DEFAULT_TEST_MESSAGE } from './data'
5
6
 
6
7
  it('should render <Avatar /> and compare with snapshot', () => {
7
8
  const { toJSON } = render(
8
- <Avatar renderAvatar={() => 'renderAvatar'} position='left' />
9
+ <Avatar
10
+ renderAvatar={() => 'renderAvatar'}
11
+ position='left'
12
+ currentMessage={DEFAULT_TEST_MESSAGE}
13
+ />
9
14
  )
10
15
 
11
16
  expect(toJSON()).toMatchSnapshot()
@@ -1,18 +1,14 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Bubble } from '../GiftedChat'
4
+ import { Bubble } from '..'
5
+ import { DEFAULT_TEST_MESSAGE } from './data'
5
6
 
6
7
  it('should render <Bubble /> and compare with snapshot', () => {
7
8
  const { toJSON } = render(
8
9
  <Bubble
9
10
  user={{ _id: 1 }}
10
- currentMessage={{
11
- _id: 1,
12
- text: 'test',
13
- createdAt: 1554744013721,
14
- user: { _id: 1 },
15
- }}
11
+ currentMessage={DEFAULT_TEST_MESSAGE}
16
12
  position='left'
17
13
  />
18
14
  )
@@ -1,4 +1,4 @@
1
- import Color from '../Color'
1
+ import { Color } from '../Color'
2
2
 
3
3
  it('should compare Color with snapshot', () => {
4
4
  expect(Color).toMatchSnapshot()
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Composer } from '../GiftedChat'
4
+ import { Composer } from '..'
5
5
 
6
6
  it('should render <Composer /> and compare with snapshot', () => {
7
7
  const { toJSON } = render(<Composer />)
@@ -1,19 +1,19 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Day } from '../GiftedChat'
4
+ import { Day } from '..'
5
5
  import { DEFAULT_TEST_MESSAGE } from './data'
6
6
 
7
7
  describe('Day', () => {
8
8
  it('should not render <Day /> and compare with snapshot', () => {
9
- const { toJSON } = render(<Day />)
9
+ const { toJSON } = render(<Day createdAt={DEFAULT_TEST_MESSAGE.createdAt} />)
10
10
 
11
11
  expect(toJSON()).toMatchSnapshot()
12
12
  })
13
13
 
14
14
  it('should render <Day /> and compare with snapshot', () => {
15
15
  const { toJSON } = render(
16
- <Day currentMessage={DEFAULT_TEST_MESSAGE} />
16
+ <Day createdAt={DEFAULT_TEST_MESSAGE.createdAt} />
17
17
  )
18
18
  expect(toJSON()).toMatchSnapshot()
19
19
  })
@@ -2,19 +2,13 @@ import React from 'react'
2
2
  import { View, Text } from 'react-native'
3
3
  import { render } from '@testing-library/react-native'
4
4
  import { DayProps } from '../Day'
5
- import DayAnimated from '../MessageContainer/components/DayAnimated'
5
+ import { DayAnimated } from '../MessageContainer/components/DayAnimated'
6
+ import { DEFAULT_TEST_MESSAGE } from './data'
6
7
 
7
8
  const mockDaysPositions = { value: {} }
8
9
  const mockScrolledY = { value: 0 }
9
10
  const mockListHeight = { value: 800 }
10
11
 
11
- const mockMessage = {
12
- _id: 1,
13
- text: 'Hello',
14
- createdAt: new Date('2023-01-01'),
15
- user: { _id: 1, name: 'User 1' },
16
- }
17
-
18
12
  describe('DayAnimated', () => {
19
13
  it('should render DayAnimated with default Day component', () => {
20
14
  const { toJSON } = render(
@@ -22,7 +16,7 @@ describe('DayAnimated', () => {
22
16
  scrolledY={mockScrolledY}
23
17
  daysPositions={mockDaysPositions}
24
18
  listHeight={mockListHeight}
25
- messages={[mockMessage]}
19
+ messages={[DEFAULT_TEST_MESSAGE]}
26
20
  isLoading={false}
27
21
  />
28
22
  )
@@ -32,7 +26,7 @@ describe('DayAnimated', () => {
32
26
  it('should use custom renderDay when provided', () => {
33
27
  const customRenderDay = jest.fn((props: DayProps) => (
34
28
  <View testID='custom-day'>
35
- <Text>Custom Day: {props.createdAt}</Text>
29
+ <Text>Custom Day: {props.createdAt.toLocaleString()}</Text>
36
30
  </View>
37
31
  ))
38
32
 
@@ -41,7 +35,7 @@ describe('DayAnimated', () => {
41
35
  scrolledY={mockScrolledY}
42
36
  daysPositions={mockDaysPositions}
43
37
  listHeight={mockListHeight}
44
- messages={[mockMessage]}
38
+ messages={[DEFAULT_TEST_MESSAGE]}
45
39
  isLoading={false}
46
40
  renderDay={customRenderDay}
47
41
  />
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { GiftedAvatar } from '../GiftedChat'
4
+ import { GiftedAvatar } from '..'
5
5
 
6
6
  it('should render <GiftedAvatar /> and compare with snapshot', () => {
7
7
  const { toJSON } = render(<GiftedAvatar />)
@@ -2,7 +2,7 @@ import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
4
  import { useReanimatedKeyboardAnimation } from 'react-native-keyboard-controller'
5
- import { GiftedChat } from '../GiftedChat'
5
+ import { GiftedChat } from '..'
6
6
 
7
7
  const messages = [
8
8
  {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { InputToolbar } from '../GiftedChat'
4
+ import { InputToolbar } from '..'
5
5
 
6
6
  it('should render <InputToolbar /> and compare with snapshot', () => {
7
7
  const { toJSON } = render(<InputToolbar />)
@@ -1,10 +1,10 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { LoadEarlierMessages } from '../GiftedChat'
4
+ import { LoadEarlierMessages } from '..'
5
5
 
6
6
  it('should render <LoadEarlierMessages /> and compare with snapshot', () => {
7
- const { toJSON } = render(<LoadEarlierMessages />)
7
+ const { toJSON } = render(<LoadEarlierMessages isAvailable isLoading={false} onPress={() => {}} />)
8
8
 
9
9
  expect(toJSON()).toMatchSnapshot()
10
10
  })
@@ -1,7 +1,8 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Message } from '../GiftedChat'
4
+ import { Message } from '..'
5
+ import { DEFAULT_TEST_MESSAGE } from './data'
5
6
 
6
7
  describe('Message component', () => {
7
8
  it('should render <Message /> and compare with snapshot', () => {
@@ -35,12 +36,7 @@ describe('Message component', () => {
35
36
  <Message
36
37
  key='123'
37
38
  user={{ _id: 1 }}
38
- currentMessage={{
39
- _id: 1,
40
- text: 'test',
41
- createdAt: 1554744013721,
42
- user: { _id: 1 },
43
- }}
39
+ currentMessage={DEFAULT_TEST_MESSAGE}
44
40
  position='left'
45
41
  showUserAvatar
46
42
  />
@@ -55,12 +51,10 @@ describe('Message component', () => {
55
51
  key='123'
56
52
  user={{ _id: 1 }}
57
53
  currentMessage={{
58
- _id: 1,
59
- text: 'test',
60
- createdAt: 1554744013721,
54
+ ...DEFAULT_TEST_MESSAGE,
61
55
  user: {
62
56
  _id: 1,
63
- avatar: null,
57
+ avatar: undefined,
64
58
  },
65
59
  }}
66
60
  position='left'
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { MessageContainer } from '../GiftedChat'
4
+ import { MessageContainer } from '..'
5
5
  import { DEFAULT_TEST_MESSAGE } from './data'
6
6
 
7
7
  it('should render <MessageContainer /> without crashing', () => {
@@ -9,7 +9,7 @@ it('should render <MessageContainer /> without crashing', () => {
9
9
  expect(() => render(
10
10
  <MessageContainer
11
11
  messages={[DEFAULT_TEST_MESSAGE]}
12
- user={{ _id: 'test' }}
12
+ user={{ _id: 1 }}
13
13
  />
14
14
  )).not.toThrow()
15
15
  })
@@ -23,7 +23,7 @@ it('should render <MessageContainer /> with multiple messages', () => {
23
23
  expect(() => render(
24
24
  <MessageContainer
25
25
  messages={messages}
26
- user={{ _id: 'test' }}
26
+ user={{ _id: 1 }}
27
27
  />
28
28
  )).not.toThrow()
29
29
  })
@@ -32,7 +32,7 @@ it('should render <MessageContainer /> with empty messages', () => {
32
32
  expect(() => render(
33
33
  <MessageContainer
34
34
  messages={[]}
35
- user={{ _id: 'test' }}
35
+ user={{ _id: 1 }}
36
36
  />
37
37
  )).not.toThrow()
38
38
  })
@@ -1,12 +1,12 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { MessageImage } from '../GiftedChat'
4
+ import { MessageImage } from '..'
5
5
  import { DEFAULT_TEST_MESSAGE } from './data'
6
6
 
7
7
  describe('MessageImage', () => {
8
8
  it('should not render <MessageImage /> and compare with snapshot', () => {
9
- const { toJSON } = render(<MessageImage />)
9
+ const { toJSON } = render(<MessageImage currentMessage={null} />)
10
10
  expect(toJSON()).toMatchSnapshot()
11
11
  })
12
12
 
@@ -1,12 +1,13 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { MessageText } from '../GiftedChat'
4
+ import { MessageText } from '..'
5
+ import { DEFAULT_TEST_MESSAGE } from './data'
5
6
 
6
7
  it('should render <MessageText /> and compare with snapshot', () => {
7
8
  const { toJSON } = render(
8
9
  <MessageText
9
- currentMessage={{ _id: 1, createdAt: new Date(), text: 'test message' }}
10
+ currentMessage={DEFAULT_TEST_MESSAGE}
10
11
  />
11
12
  )
12
13
 
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Send } from '../GiftedChat'
4
+ import { Send } from '..'
5
5
 
6
6
  describe('Send', () => {
7
7
  it('should not render <Send /> and compare with snapshot', () => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { SystemMessage } from '../GiftedChat'
4
+ import { SystemMessage } from '..'
5
5
  import { DEFAULT_TEST_MESSAGE } from './data'
6
6
 
7
7
  describe('SystemMessage', () => {
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { render } from '@testing-library/react-native'
3
3
 
4
- import { Time } from '../GiftedChat'
4
+ import { Time } from '..'
5
5
  import { DEFAULT_TEST_MESSAGE } from './data'
6
6
 
7
7
  describe('Time', () => {
@@ -22,31 +22,6 @@ exports[`should render <Actions /> and compare with snapshot 1`] = `
22
22
  accessible={true}
23
23
  collapsable={false}
24
24
  focusable={true}
25
- jestAnimatedProps={
26
- {
27
- "value": {},
28
- }
29
- }
30
- jestAnimatedStyle={
31
- {
32
- "value": {
33
- "opacity": 1,
34
- },
35
- }
36
- }
37
- jestInlineStyle={
38
- [
39
- [
40
- {
41
- "height": 26,
42
- "marginBottom": 10,
43
- "marginLeft": 10,
44
- "width": 26,
45
- },
46
- undefined,
47
- ],
48
- ]
49
- }
50
25
  onBlur={[Function]}
51
26
  onClick={[Function]}
52
27
  onFocus={[Function]}
@@ -56,57 +31,86 @@ exports[`should render <Actions /> and compare with snapshot 1`] = `
56
31
  onResponderTerminate={[Function]}
57
32
  onResponderTerminationRequest={[Function]}
58
33
  onStartShouldSetResponder={[Function]}
59
- style={
60
- [
61
- {
62
- "height": 26,
63
- "marginBottom": 10,
64
- "marginLeft": 10,
65
- "width": 26,
66
- },
67
- undefined,
68
- {
69
- "opacity": 1,
70
- },
71
- ]
72
- }
73
34
  >
74
35
  <View
36
+ collapsable={false}
37
+ jestAnimatedProps={
38
+ {
39
+ "value": {},
40
+ }
41
+ }
42
+ jestAnimatedStyle={
43
+ {
44
+ "value": {
45
+ "opacity": 1,
46
+ },
47
+ }
48
+ }
49
+ jestInlineStyle={
50
+ [
51
+ [
52
+ {
53
+ "height": 26,
54
+ "marginBottom": 10,
55
+ "marginLeft": 10,
56
+ "width": 26,
57
+ },
58
+ undefined,
59
+ ],
60
+ ]
61
+ }
75
62
  style={
76
63
  [
77
64
  {
78
- "flex": 1,
79
- },
80
- {
81
- "alignItems": "center",
82
- "justifyContent": "center",
65
+ "height": 26,
66
+ "marginBottom": 10,
67
+ "marginLeft": 10,
68
+ "width": 26,
83
69
  },
70
+ undefined,
84
71
  {
85
- "borderColor": "#b2b2b2",
86
- "borderRadius": 13,
87
- "borderWidth": 2,
72
+ "opacity": 1,
88
73
  },
89
- undefined,
90
74
  ]
91
75
  }
92
76
  >
93
- <Text
77
+ <View
94
78
  style={
95
79
  [
96
80
  {
97
- "backgroundColor": "transparent",
98
- "color": "#b2b2b2",
99
- "fontSize": 16,
100
- "fontWeight": "bold",
101
- "lineHeight": 16,
102
- "textAlign": "center",
81
+ "flex": 1,
82
+ },
83
+ {
84
+ "alignItems": "center",
85
+ "justifyContent": "center",
86
+ },
87
+ {
88
+ "borderColor": "#b2b2b2",
89
+ "borderRadius": 13,
90
+ "borderWidth": 2,
103
91
  },
104
92
  undefined,
105
93
  ]
106
94
  }
107
95
  >
108
- +
109
- </Text>
96
+ <Text
97
+ style={
98
+ [
99
+ {
100
+ "backgroundColor": "transparent",
101
+ "color": "#b2b2b2",
102
+ "fontSize": 16,
103
+ "fontWeight": "bold",
104
+ "lineHeight": 16,
105
+ "textAlign": "center",
106
+ },
107
+ undefined,
108
+ ]
109
+ }
110
+ >
111
+ +
112
+ </Text>
113
+ </View>
110
114
  </View>
111
115
  </View>
112
116
  `;
@@ -77,7 +77,6 @@ exports[`should render <Bubble /> and compare with snapshot 1`] = `
77
77
  }
78
78
  >
79
79
  <Text
80
- link={true}
81
80
  style={
82
81
  [
83
82
  {
@@ -134,7 +133,7 @@ exports[`should render <Bubble /> and compare with snapshot 1`] = `
134
133
  ]
135
134
  }
136
135
  >
137
- 7:20 PM
136
+ 12:00 AM
138
137
  </Text>
139
138
  </View>
140
139
  </View>
@@ -1,5 +1,99 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
- exports[`Day should not render <Day /> and compare with snapshot 1`] = `null`;
3
+ exports[`Day should not render <Day /> and compare with snapshot 1`] = `
4
+ <View
5
+ style={
6
+ [
7
+ {
8
+ "alignItems": "center",
9
+ "justifyContent": "center",
10
+ },
11
+ {
12
+ "marginBottom": 10,
13
+ "marginTop": 5,
14
+ },
15
+ undefined,
16
+ ]
17
+ }
18
+ >
19
+ <View
20
+ style={
21
+ [
22
+ {
23
+ "backgroundColor": "rgba(0, 0, 0, 0.75)",
24
+ "borderRadius": 15,
25
+ "paddingBottom": 6,
26
+ "paddingLeft": 10,
27
+ "paddingRight": 10,
28
+ "paddingTop": 6,
29
+ },
30
+ undefined,
31
+ ]
32
+ }
33
+ >
34
+ <Text
35
+ style={
36
+ [
37
+ {
38
+ "color": "#fff",
39
+ "fontSize": 12,
40
+ "fontWeight": "600",
41
+ },
42
+ undefined,
43
+ ]
44
+ }
45
+ >
46
+ 17 April 2022
47
+ </Text>
48
+ </View>
49
+ </View>
50
+ `;
4
51
 
5
- exports[`Day should render <Day /> and compare with snapshot 1`] = `null`;
52
+ exports[`Day should render <Day /> and compare with snapshot 1`] = `
53
+ <View
54
+ style={
55
+ [
56
+ {
57
+ "alignItems": "center",
58
+ "justifyContent": "center",
59
+ },
60
+ {
61
+ "marginBottom": 10,
62
+ "marginTop": 5,
63
+ },
64
+ undefined,
65
+ ]
66
+ }
67
+ >
68
+ <View
69
+ style={
70
+ [
71
+ {
72
+ "backgroundColor": "rgba(0, 0, 0, 0.75)",
73
+ "borderRadius": 15,
74
+ "paddingBottom": 6,
75
+ "paddingLeft": 10,
76
+ "paddingRight": 10,
77
+ "paddingTop": 6,
78
+ },
79
+ undefined,
80
+ ]
81
+ }
82
+ >
83
+ <Text
84
+ style={
85
+ [
86
+ {
87
+ "color": "#fff",
88
+ "fontSize": 12,
89
+ "fontWeight": "600",
90
+ },
91
+ undefined,
92
+ ]
93
+ }
94
+ >
95
+ 17 April 2022
96
+ </Text>
97
+ </View>
98
+ </View>
99
+ `;