@tactics/toddle-styleguide 1.2.3 → 1.2.5

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 (77) hide show
  1. package/App.tsx +202 -191
  2. package/index.d.ts +2 -1
  3. package/index.tsx +2 -0
  4. package/package.json +2 -2
  5. package/src/components/atoms/backdrop/backdrop.component.d.ts +2 -1
  6. package/src/components/atoms/backdrop/backdrop.component.tsx +8 -2
  7. package/src/components/atoms/calendar/__snapshots__/calendar.test.js.snap +1821 -641
  8. package/src/components/atoms/text-input/text-input.component.d.ts +4 -5
  9. package/src/components/atoms/text-input/text-input.component.tsx +9 -13
  10. package/src/components/atoms/text-input/text-input.preview.tsx +5 -5
  11. package/src/components/atoms/text-input/text-input.test.js +4 -4
  12. package/src/components/molecules/avatar/__snapshots__/avatar.test.js.snap +70 -62
  13. package/src/components/molecules/avatar/avatar.component.d.ts +2 -1
  14. package/src/components/molecules/avatar/avatar.component.tsx +22 -11
  15. package/src/components/molecules/avatar/avatar.preview.tsx +58 -44
  16. package/src/components/molecules/avatar/avatar.styles.d.ts +54 -15
  17. package/src/components/molecules/avatar/avatar.styles.js +33 -5
  18. package/src/components/molecules/button/__snapshots__/button.test.js.snap +144 -0
  19. package/src/components/molecules/button/button.component.d.ts +6 -4
  20. package/src/components/molecules/button/button.component.tsx +30 -9
  21. package/src/components/molecules/button/button.preview.tsx +16 -1
  22. package/src/components/molecules/button/button.styles.d.ts +13 -16
  23. package/src/components/molecules/button/button.styles.js +2 -4
  24. package/src/components/molecules/button/button.test.js +12 -0
  25. package/src/components/molecules/date-input/date-input.preview.tsx +25 -23
  26. package/src/components/molecules/message-input/__snapshots__/message-input.test.js.snap +4 -0
  27. package/src/components/molecules/message-input/message-input.component.d.ts +4 -6
  28. package/src/components/molecules/message-input/message-input.component.tsx +10 -12
  29. package/src/components/molecules/message-input/message-input.preview.tsx +28 -15
  30. package/src/components/molecules/password-input/password-input.component.d.ts +4 -6
  31. package/src/components/molecules/password-input/password-input.component.tsx +11 -15
  32. package/src/components/molecules/swipe/__snapshots__/swipe.test.js.snap +263 -420
  33. package/src/components/molecules/swipe/swipe.component.d.ts +4 -4
  34. package/src/components/molecules/swipe/swipe.component.tsx +47 -20
  35. package/src/components/molecules/swipe/swipe.preview.tsx +111 -51
  36. package/src/components/molecules/swipe/swipe.styles.d.ts +28 -0
  37. package/src/components/molecules/swipe/swipe.styles.js +32 -0
  38. package/src/components/molecules/swipe/swipe.test.js +1 -1
  39. package/src/components/molecules/tag/__snapshots__/tag.test.js.snap +10 -10
  40. package/src/components/molecules/tag/tag.component.d.ts +3 -8
  41. package/src/components/molecules/tag/tag.component.tsx +7 -13
  42. package/src/components/molecules/tag/tag.preview.tsx +22 -19
  43. package/src/components/molecules/tag/tag.styles.js +4 -2
  44. package/src/components/molecules/tag/tag.test.js +10 -2
  45. package/src/components/molecules/time-picker/__snapshots__/time-picker.test.js.snap +1868 -1776
  46. package/src/components/molecules/time-picker/time-picker.component.tsx +49 -23
  47. package/src/components/molecules/time-picker/time-picker.preview.tsx +5 -4
  48. package/src/components/molecules/time-picker/time-picker.styles.d.ts +16 -4
  49. package/src/components/molecules/time-picker/time-picker.styles.js +18 -6
  50. package/src/components/molecules/timestamp/__snapshots__/timestamp.test.js.snap +1 -1
  51. package/src/components/molecules/timestamp/timestamp.component.tsx +0 -2
  52. package/src/components/organisms/child-list-item/__snapshots__/child-list-item.test.js.snap +174 -162
  53. package/src/components/organisms/contact-item/__snapshots__/contact-item.test.js.snap +70 -127
  54. package/src/components/organisms/contact-item/contact-item.component.tsx +10 -9
  55. package/src/components/organisms/my-child-list-item/__snapshots__/my-child-list-item.test.js.snap +97 -89
  56. package/src/components/organisms/person-info-card/__snapshots__/person-info-card.test.js.snap +233 -209
  57. package/src/components/organisms/text-bubble/__snapshots__/text-bubble.test.js.snap +7 -7
  58. package/src/components/templates/modal/modal.component.tsx +0 -1
  59. package/src/components/templates/popover/components/modal/modal.component.tsx +0 -1
  60. package/src/components/templates/popover/components/modal/modal.styles.d.ts +2 -1
  61. package/src/components/templates/popover/components/modal/modal.styles.js +2 -2
  62. package/src/components/templates/popover/popover.component.tsx +27 -14
  63. package/src/components/templates/popover/popover.preview.tsx +63 -97
  64. package/src/components/templates/popover/popover.styles.d.ts +1 -1
  65. package/src/components/templates/popover/popover.styles.js +3 -1
  66. package/src/components/templates/popover-action/popover-action.component.d.ts +8 -0
  67. package/src/components/templates/popover-action/popover-action.component.tsx +119 -0
  68. package/src/components/templates/popover-action/popover-action.preview.d.ts +1 -0
  69. package/src/components/templates/popover-action/popover-action.preview.tsx +142 -0
  70. package/src/components/templates/popover-action/popover-action.styles.d.ts +26 -0
  71. package/src/components/templates/popover-action/popover-action.styles.js +31 -0
  72. package/src/utilities/toddle-datetime/toddle-datetime.class.d.ts +5 -0
  73. package/src/utilities/toddle-datetime/toddle-datetime.class.tsx +23 -0
  74. package/src/utilities/toddle-datetime/toddle-datetime.preview.tsx +15 -1
  75. package/src/utilities/toddle-datetime/toddle-datetime.test.js +10 -0
  76. package/src/components/molecules/swipe/Swipe.styles.d.ts +0 -7
  77. package/src/components/molecules/swipe/Swipe.styles.js +0 -10
@@ -1,9 +1,8 @@
1
+ import { TextInputProps as NativeTextInputProps } from 'react-native';
1
2
  import { KeyBoardTypes } from '../../../types/keyboard-types.enum';
2
- type TextInputProps = {
3
- placeholder?: string;
4
- onchangeText?: (text: string) => void;
3
+ interface TextInputProps extends NativeTextInputProps {
5
4
  keyboardType: KeyBoardTypes;
6
5
  border?: boolean;
7
- };
8
- declare const TextInput: ({ placeholder, onchangeText, keyboardType, border, }: TextInputProps) => JSX.Element;
6
+ }
7
+ declare const TextInput: ({ keyboardType, border, ...props }: TextInputProps) => JSX.Element;
9
8
  export { TextInput as TextInput };
@@ -1,35 +1,31 @@
1
1
  import * as React from 'react';
2
2
  import {useContext} from 'react';
3
3
 
4
- import {View, TextInput as NativeTextInput} from 'react-native';
4
+ import {
5
+ View,
6
+ TextInput as NativeTextInput,
7
+ TextInputProps as NativeTextInputProps,
8
+ } from 'react-native';
5
9
  import {ThemeCtx} from '../../../context/theme.context';
6
10
  import {Stylesheet} from './text-input.styles';
7
11
  import {KeyBoardTypes} from '../../../types/keyboard-types.enum';
8
12
 
9
- type TextInputProps = {
10
- placeholder?: string;
11
- onchangeText?: (text: string) => void;
13
+ interface TextInputProps extends NativeTextInputProps {
12
14
  keyboardType: KeyBoardTypes;
13
15
  border?: boolean;
14
- };
16
+ }
15
17
 
16
- const TextInput = ({
17
- placeholder,
18
- onchangeText,
19
- keyboardType,
20
- border,
21
- }: TextInputProps) => {
18
+ const TextInput = ({keyboardType, border, ...props}: TextInputProps) => {
22
19
  const context = useContext(ThemeCtx);
23
20
  const styles = Stylesheet(context, border);
24
21
 
25
22
  return (
26
23
  <View style={styles.container}>
27
24
  <NativeTextInput
28
- placeholder={placeholder}
29
25
  placeholderTextColor={context.colors.ui.grey}
30
26
  style={styles.input}
31
- onChangeText={onchangeText}
32
27
  keyboardType={keyboardType}
28
+ {...props}
33
29
  />
34
30
  </View>
35
31
  );
@@ -7,33 +7,33 @@ export const TextInputPreview = ({} = {}) => {
7
7
  return (
8
8
  <SafeAreaView style={{flex: 1, justifyContent: 'space-around'}}>
9
9
  <TextInput
10
- onchangeText={(text: string) =>
10
+ onChangeText={(text: string) =>
11
11
  console.log('text is changed to: ' + text)
12
12
  }
13
13
  keyboardType={KeyBoardTypes.DECIMAL_PAD}
14
14
  />
15
15
  <TextInput
16
16
  placeholder={'placeholder text'}
17
- onchangeText={(text: string) =>
17
+ onChangeText={(text: string) =>
18
18
  console.log('text is changed to: ' + text)
19
19
  }
20
20
  keyboardType={KeyBoardTypes.DEFAULT}
21
21
  />
22
22
  <TextInput
23
- onchangeText={(text: string) =>
23
+ onChangeText={(text: string) =>
24
24
  console.log('text is changed to: ' + text)
25
25
  }
26
26
  keyboardType={KeyBoardTypes.EMAIL_ADDRESS}
27
27
  />
28
28
  <TextInput
29
29
  keyboardType={KeyBoardTypes.DEFAULT}
30
- onchangeText={(text: string) => console.log('text: ' + text)}
30
+ onChangeText={(text: string) => console.log('text: ' + text)}
31
31
  placeholder={'with border'}
32
32
  border={true}
33
33
  />
34
34
  <TextInput
35
35
  keyboardType={KeyBoardTypes.DEFAULT}
36
- onchangeText={(text: string) => console.log('text: ' + text)}
36
+ onChangeText={(text: string) => console.log('text: ' + text)}
37
37
  border={true}
38
38
  />
39
39
  </SafeAreaView>
@@ -10,7 +10,7 @@ describe('test input texts', () => {
10
10
  <TextInput
11
11
  keyboardType={KeyBoardTypes.DEFAULT}
12
12
  placeholder="dummy placeholder"
13
- onchangeText={() => console.log('text changed')}
13
+ onChangeText={() => console.log('text changed')}
14
14
  />
15
15
  )
16
16
  .toJSON();
@@ -22,7 +22,7 @@ describe('test input texts', () => {
22
22
  .create(
23
23
  <TextInput
24
24
  keyboardType={KeyBoardTypes.EMAIL_ADDRESS}
25
- onchangeText={() => console.log('text changed')}
25
+ onChangeText={() => console.log('text changed')}
26
26
  />
27
27
  )
28
28
  .toJSON();
@@ -34,7 +34,7 @@ describe('test input texts', () => {
34
34
  .create(
35
35
  <TextInput
36
36
  keyboardType={KeyBoardTypes.EMAIL_ADDRESS}
37
- onchangeText={() => console.log('text changed')}
37
+ onChangeText={() => console.log('text changed')}
38
38
  border={true}
39
39
  />
40
40
  )
@@ -47,7 +47,7 @@ describe('test input texts', () => {
47
47
  .create(
48
48
  <TextInput
49
49
  keyboardType={KeyBoardTypes.EMAIL_ADDRESS}
50
- onchangeText={() => console.log('text changed')}
50
+ onChangeText={() => console.log('text changed')}
51
51
  border={true}
52
52
  placeholder={'Text input field with a border'}
53
53
  />
@@ -2,88 +2,96 @@
2
2
 
3
3
  exports[`test avatar given the isBlocked is true, and provide image source is empty return a red colored avatar 1`] = `
4
4
  <View
5
- style={
6
- [
7
- {
8
- "alignItems": "center",
9
- "backgroundColor": "#647ACB",
10
- "justifyContent": "center",
11
- "overflow": "hidden",
12
- },
13
- {
14
- "borderRadius": 20,
15
- "height": 40,
16
- "width": 40,
17
- },
18
- false,
19
- false,
20
- ]
21
- }
5
+ style={null}
22
6
  >
23
- <Text
7
+ <View
24
8
  style={
25
9
  [
26
- [
27
- {
28
- "fontFamily": "SourceSansProBold",
29
- "fontSize": 18,
30
- "lineHeight": 22.6,
31
- },
32
- ],
33
10
  {
34
- "color": "#FFFFFF",
35
- "textAlign": "center",
36
- "width": "100%",
11
+ "alignItems": "center",
12
+ "backgroundColor": "#647ACB",
13
+ "justifyContent": "center",
14
+ "overflow": "hidden",
15
+ },
16
+ {
17
+ "borderRadius": 20,
18
+ "height": 40,
19
+ "width": 40,
37
20
  },
38
- undefined,
21
+ false,
22
+ false,
39
23
  ]
40
24
  }
41
25
  >
42
- JD
43
- </Text>
26
+ <Text
27
+ style={
28
+ [
29
+ [
30
+ {
31
+ "fontFamily": "SourceSansProBold",
32
+ "fontSize": 18,
33
+ "lineHeight": 22.6,
34
+ },
35
+ ],
36
+ {
37
+ "color": "#FFFFFF",
38
+ "textAlign": "center",
39
+ "width": "100%",
40
+ },
41
+ undefined,
42
+ ]
43
+ }
44
+ >
45
+ JD
46
+ </Text>
47
+ </View>
44
48
  </View>
45
49
  `;
46
50
 
47
51
  exports[`test avatar renders correctly when provided image source is empty 1`] = `
48
52
  <View
49
- style={
50
- [
51
- {
52
- "alignItems": "center",
53
- "backgroundColor": "#647ACB",
54
- "justifyContent": "center",
55
- "overflow": "hidden",
56
- },
57
- {
58
- "borderRadius": 20,
59
- "height": 40,
60
- "width": 40,
61
- },
62
- false,
63
- false,
64
- ]
65
- }
53
+ style={null}
66
54
  >
67
- <Text
55
+ <View
68
56
  style={
69
57
  [
70
- [
71
- {
72
- "fontFamily": "SourceSansProBold",
73
- "fontSize": 18,
74
- "lineHeight": 22.6,
75
- },
76
- ],
77
58
  {
78
- "color": "#FFFFFF",
79
- "textAlign": "center",
80
- "width": "100%",
59
+ "alignItems": "center",
60
+ "backgroundColor": "#647ACB",
61
+ "justifyContent": "center",
62
+ "overflow": "hidden",
63
+ },
64
+ {
65
+ "borderRadius": 20,
66
+ "height": 40,
67
+ "width": 40,
81
68
  },
82
- undefined,
69
+ false,
70
+ false,
83
71
  ]
84
72
  }
85
73
  >
86
- JD
87
- </Text>
74
+ <Text
75
+ style={
76
+ [
77
+ [
78
+ {
79
+ "fontFamily": "SourceSansProBold",
80
+ "fontSize": 18,
81
+ "lineHeight": 22.6,
82
+ },
83
+ ],
84
+ {
85
+ "color": "#FFFFFF",
86
+ "textAlign": "center",
87
+ "width": "100%",
88
+ },
89
+ undefined,
90
+ ]
91
+ }
92
+ >
93
+ JD
94
+ </Text>
95
+ </View>
88
96
  </View>
89
97
  `;
@@ -7,6 +7,7 @@ type AvatarProps = {
7
7
  isBlocked?: boolean;
8
8
  isActive?: boolean;
9
9
  isLoading?: boolean;
10
+ hasShadow?: boolean;
10
11
  };
11
- declare const Avatar: ({ source, size, isBlocked, isActive, isLoading, }: AvatarProps) => JSX.Element;
12
+ declare const Avatar: ({ source, size, isBlocked, isActive, isLoading, hasShadow, }: AvatarProps) => JSX.Element;
12
13
  export { Avatar as Avatar };
@@ -21,6 +21,7 @@ type AvatarProps = {
21
21
  isBlocked?: boolean;
22
22
  isActive?: boolean;
23
23
  isLoading?: boolean;
24
+ hasShadow?: boolean;
24
25
  };
25
26
 
26
27
  const Avatar = ({
@@ -29,6 +30,7 @@ const Avatar = ({
29
30
  isBlocked,
30
31
  isActive = true,
31
32
  isLoading,
33
+ hasShadow,
32
34
  }: AvatarProps) => {
33
35
  const Context = useContext(ThemeCtx);
34
36
  const styles = Stylesheet(Context, size, isBlocked, isActive);
@@ -69,21 +71,30 @@ const Avatar = ({
69
71
  };
70
72
 
71
73
  return source instanceof Initials ? (
72
- <View style={styles.container}>
73
- {isLoading ? (
74
- <ActivityIndicator size={'small'} color={Context.colors.ui.white} />
75
- ) : (
76
- renderText(size)
77
- )}
74
+ <View style={hasShadow ? styles.shadow : null}>
75
+ <View style={styles.container}>
76
+ {isLoading ? (
77
+ <ActivityIndicator size={'small'} color={Context.colors.ui.white} />
78
+ ) : (
79
+ renderText(size)
80
+ )}
81
+ </View>
78
82
  </View>
79
83
  ) : isLoading ? (
80
- <View style={styles.container}>
81
- <ActivityIndicator size={'small'} color={Context.colors.ui.white} />
84
+ <View style={hasShadow ? styles.shadow : null}>
85
+ <View style={styles.container}>
86
+ {!isBlocked ? <MainGradient isActive={isActive} /> : null}
87
+ <View style={{zIndex: 100, position: 'absolute'}}>
88
+ <ActivityIndicator size={'small'} color={Context.colors.ui.white} />
89
+ </View>
90
+ </View>
82
91
  </View>
83
92
  ) : (
84
- <View style={styles.container}>
85
- {!isBlocked ? <MainGradient isActive={isActive} /> : null}
86
- <Image source={source} style={styles.image as ImageStyle} />
93
+ <View style={hasShadow ? styles.shadow : null}>
94
+ <View style={styles.container}>
95
+ {!isBlocked ? <MainGradient isActive={isActive} /> : null}
96
+ <Image source={source} style={styles.image as ImageStyle} />
97
+ </View>
87
98
  </View>
88
99
  );
89
100
  };
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import {ScrollView} from 'react-native';
2
3
 
3
4
  const {Avatar} = require('./avatar.component');
4
5
  const {Size} = require('../../../types/size.enum');
@@ -7,49 +8,62 @@ const {View} = require('react-native');
7
8
 
8
9
  export const AvatarPreview = ({}: {}) => {
9
10
  return (
10
- <View
11
- style={{
12
- flex: 1,
13
- alignItems: 'center',
14
- justifyContent: 'center',
15
- backgroundColor: 'white',
16
- }}
17
- >
18
- <Avatar
19
- size={Size.LARGE}
20
- source={require('./../../../../assets/components/avatar/baby.png')}
21
- />
22
- <Avatar
23
- size={Size.MEDIUM}
24
- source={require('./../../../../assets/components/avatar/baby.png')}
25
- />
26
- <Avatar
27
- size={Size.SMALL}
28
- source={require('./../../../../assets/components/avatar/baby.png')}
29
- />
30
- <Avatar size={Size.LARGE} source={Initials.for('John', 'Doe')} />
31
- <Avatar
32
- size={Size.MEDIUM}
33
- source={Initials.for('John', 'Doe')}
34
- isBlocked={true}
35
- />
36
- <Avatar size={Size.SMALL} source={Initials.for('John', 'Doe')} />
37
- <Avatar
38
- size={Size.LARGE}
39
- source={require('./../../../../assets/components/avatar/baby.png')}
40
- isActive={false}
41
- />
42
- <Avatar
43
- size={Size.MEDIUM}
44
- source={Initials.for('John', 'Doe')}
45
- isActive={false}
46
- />
47
- <Avatar
48
- size={Size.SMALL}
49
- source={Initials.for('John', 'Doe')}
50
- isBlocked={true}
51
- isActive={false}
52
- />
53
- </View>
11
+ <ScrollView>
12
+ <View
13
+ style={{
14
+ flex: 1,
15
+ alignItems: 'center',
16
+ backgroundColor: 'white',
17
+ gap: 16,
18
+ }}
19
+ >
20
+ <Avatar
21
+ size={Size.LARGE}
22
+ source={require('./../../../../assets/components/avatar/baby.png')}
23
+ hasShadow={true}
24
+ isLoading={true}
25
+ />
26
+ <Avatar
27
+ size={Size.MEDIUM}
28
+ source={require('./../../../../assets/components/avatar/baby.png')}
29
+ hasShadow={true}
30
+ />
31
+ <Avatar
32
+ size={Size.SMALL}
33
+ source={require('./../../../../assets/components/avatar/baby.png')}
34
+ />
35
+ <Avatar
36
+ size={Size.LARGE}
37
+ source={Initials.for('John', 'Doe')}
38
+ hasShadow={true}
39
+ />
40
+ <Avatar
41
+ size={Size.MEDIUM}
42
+ source={Initials.for('John', 'Doe')}
43
+ isBlocked={true}
44
+ hasShadow={true}
45
+ />
46
+ <Avatar size={Size.SMALL} source={Initials.for('John', 'Doe')} />
47
+ <Avatar
48
+ size={Size.LARGE}
49
+ source={require('./../../../../assets/components/avatar/baby.png')}
50
+ isActive={false}
51
+ hasShadow={true}
52
+ />
53
+ <Avatar
54
+ size={Size.MEDIUM}
55
+ source={Initials.for('John', 'Doe')}
56
+ isActive={false}
57
+ hasShadow={true}
58
+ />
59
+ <Avatar
60
+ size={Size.SMALL}
61
+ source={Initials.for('John', 'Doe')}
62
+ isBlocked={true}
63
+ isActive={false}
64
+ hasShadow={true}
65
+ />
66
+ </View>
67
+ </ScrollView>
54
68
  );
55
69
  };
@@ -1,5 +1,5 @@
1
1
  export function Stylesheet(
2
- Context: any,
2
+ context: any,
3
3
  size: any,
4
4
  isBlocked: any,
5
5
  isActive: any
@@ -26,24 +26,63 @@ export function Stylesheet(
26
26
  alignItems?: undefined;
27
27
  }
28
28
  )[];
29
+ shadow: (
30
+ | {
31
+ backgroundColor: string;
32
+ shadowColor?: undefined;
33
+ shadowOpacity?: undefined;
34
+ shadowRadius?: undefined;
35
+ shadowOffset?: undefined;
36
+ elevation?: undefined;
37
+ width?: undefined;
38
+ height?: undefined;
39
+ borderRadius?: undefined;
40
+ }
41
+ | {
42
+ shadowColor: any;
43
+ shadowOpacity: number;
44
+ shadowRadius: number;
45
+ shadowOffset: {
46
+ width: number;
47
+ height: number;
48
+ };
49
+ backgroundColor?: undefined;
50
+ elevation?: undefined;
51
+ width?: undefined;
52
+ height?: undefined;
53
+ borderRadius?: undefined;
54
+ }
55
+ | {
56
+ elevation: number;
57
+ shadowColor: any;
58
+ backgroundColor?: undefined;
59
+ shadowOpacity?: undefined;
60
+ shadowRadius?: undefined;
61
+ shadowOffset?: undefined;
62
+ width?: undefined;
63
+ height?: undefined;
64
+ borderRadius?: undefined;
65
+ }
66
+ | {
67
+ width: number;
68
+ height: number;
69
+ borderRadius: number;
70
+ backgroundColor?: undefined;
71
+ shadowColor?: undefined;
72
+ shadowOpacity?: undefined;
73
+ shadowRadius?: undefined;
74
+ shadowOffset?: undefined;
75
+ elevation?: undefined;
76
+ }
77
+ )[];
29
78
  image: {
30
79
  position: string;
31
80
  width: string;
32
81
  height: string;
33
82
  borderRadius: number;
34
83
  }[];
35
- text: (
36
- | {
37
- color: any;
38
- textTransform: string;
39
- }
40
- | {
41
- fontFamily: string;
42
- fontSize: number;
43
- lineHeight: number;
44
- color?: undefined;
45
- textTransform?: undefined;
46
- }
47
- )[];
84
+ text: {
85
+ textTransform: 'uppercase';
86
+ };
48
87
  }>;
49
- import {StyleSheet} from 'react-native';
88
+ import {StyleSheet} from 'react-native/Libraries/StyleSheet/StyleSheet';
@@ -1,16 +1,16 @@
1
- import {StyleSheet} from 'react-native';
1
+ import {StyleSheet, Platform} from 'react-native';
2
2
  import {Size} from '../../../types/size.enum';
3
3
 
4
- export const Stylesheet = (Context, size, isBlocked, isActive) =>
4
+ export const Stylesheet = (context, size, isBlocked, isActive) =>
5
5
  StyleSheet.create({
6
6
  container: [
7
7
  {
8
8
  overflow: 'hidden',
9
9
  backgroundColor: isBlocked
10
- ? Context.colors.ui.error.default
10
+ ? context.colors.ui.error.default
11
11
  : isActive
12
- ? Context.colors.main['5']
13
- : Context.colors.ui.lightgrey,
12
+ ? context.colors.main['5']
13
+ : context.colors.ui.lightgrey,
14
14
  justifyContent: 'center',
15
15
  alignItems: 'center',
16
16
  },
@@ -30,6 +30,34 @@ export const Stylesheet = (Context, size, isBlocked, isActive) =>
30
30
  borderRadius: 120 / 2,
31
31
  },
32
32
  ],
33
+ shadow: [
34
+ {backgroundColor: 'white'},
35
+ Platform.OS === 'ios' && {
36
+ shadowColor: context.colors.ui.black,
37
+ shadowOpacity: 0.25,
38
+ shadowRadius: 4,
39
+ shadowOffset: {width: 0, height: 4},
40
+ },
41
+ Platform.OS === 'android' && {
42
+ elevation: 6,
43
+ shadowColor: context.colors.ui.black,
44
+ },
45
+ size === Size.SMALL && {
46
+ width: 40,
47
+ height: 40,
48
+ borderRadius: 40 / 2,
49
+ },
50
+ size === Size.MEDIUM && {
51
+ width: 72,
52
+ height: 72,
53
+ borderRadius: 72 / 2,
54
+ },
55
+ size === Size.LARGE && {
56
+ width: 120,
57
+ height: 120,
58
+ borderRadius: 120 / 2,
59
+ },
60
+ ],
33
61
  image: [
34
62
  {
35
63
  position: 'absolute',