@tactics/toddle-styleguide 1.4.15 → 1.4.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tactics/toddle-styleguide",
3
- "version": "1.4.15",
3
+ "version": "1.4.16",
4
4
  "main": "index.tsx",
5
5
  "types": "index.d.ts",
6
6
  "prepublish": "tsc",
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  import {View} from 'react-native';
3
3
  import {Icon} from '..';
4
+ import { Size } from '../../types/size.enum';
5
+ import { Scale } from '../../theme/scale';
4
6
 
5
7
  export const IconOutlineDefaultPreview = ({}: {}) => {
6
8
  return (
@@ -98,6 +100,15 @@ export const IconOutlineDefaultPreview = ({}: {}) => {
98
100
  <Icon style={'regular'} name={'user-group'} />
99
101
  <Icon style={'regular'} name={'xmark'} />
100
102
  </View>
103
+ <View
104
+ style={{
105
+ flex: 1,
106
+ alignItems: 'center',
107
+ justifyContent: 'space-around',
108
+ }}
109
+ >
110
+ <Icon style={'regular'} name={'share'} />
111
+ </View>
101
112
  </View>
102
113
  </View>
103
114
  );
@@ -42,6 +42,7 @@ import {UserIcon as User} from './user/user.icon';
42
42
  import {UserGroupIcon as UserGroup} from './user-group/user-group.icon';
43
43
  import {UsersIcon as Users} from './users/users.icon';
44
44
  import {XMarkIcon as XMark} from './xmark/xmark.icon';
45
+ import { ShareIcon } from './share/share.icon';
45
46
 
46
47
  export const Outline = ({
47
48
  name,
@@ -130,6 +131,8 @@ export const Outline = ({
130
131
  return <UserGroup size={size} color={color} />;
131
132
  case 'xmark':
132
133
  return <XMark size={size} color={color} />;
134
+ case 'share':
135
+ return <ShareIcon size={size} color={color} />
133
136
  default:
134
137
  alert('The icon you want is not available');
135
138
  break;
@@ -0,0 +1,24 @@
1
+ import * as React from 'react';
2
+ import {useContext} from 'react';
3
+ import Svg, {Path} from 'react-native-svg';
4
+ import {ThemeCtx} from '../../../context/theme.context';
5
+ import {IconSVGProps} from '../../../interfaces/icon.interface';
6
+ import {HexColor} from '../../../models/hex-color.model';
7
+ import {Scale} from '../../../theme/scale/index';
8
+
9
+ export const ShareIcon = ({color, size = Scale.l}: IconSVGProps) => {
10
+ const context = useContext(ThemeCtx);
11
+ return (
12
+ <Svg width={size} height={size} viewBox="0 0 27 26" fill="none">
13
+ <Path
14
+ stroke={
15
+ color ? HexColor.of(color).toString() : context.colors.main['0']
16
+ }
17
+ d="M9.76935 14.4538C9.99692 14.0163 10.125 13.5226 10.125 13C10.125 12.4774 9.99692 11.9837 9.76935 11.5462M9.76935 14.4538C9.21525 15.5188 8.0713 16.25 6.75 16.25C4.88604 16.25 3.375 14.7949 3.375 13C3.375 11.2051 4.88604 9.75 6.75 9.75C8.0713 9.75 9.21525 10.4812 9.76935 11.5462M9.76935 14.4538L17.2306 18.0462M9.76935 11.5462L17.2306 7.95376M17.2306 7.95376C17.7847 9.01884 18.9287 9.75 20.25 9.75C22.114 9.75 23.625 8.29493 23.625 6.5C23.625 4.70507 22.114 3.25 20.25 3.25C18.386 3.25 16.875 4.70507 16.875 6.5C16.875 7.02257 17.0031 7.51633 17.2306 7.95376ZM17.2306 18.0462C17.0031 18.4837 16.875 18.9774 16.875 19.5C16.875 21.2949 18.386 22.75 20.25 22.75C22.114 22.75 23.625 21.2949 23.625 19.5C23.625 17.7051 22.114 16.25 20.25 16.25C18.9287 16.25 17.7847 16.9812 17.2306 18.0462Z"
18
+ strokeWidth="2"
19
+ strokeLinecap="round"
20
+ strokeLinejoin="round"
21
+ />
22
+ </Svg>
23
+ );
24
+ };
@@ -0,0 +1,21 @@
1
+ import * as React from 'react';
2
+ import {useContext} from 'react';
3
+ import Svg, {Path} from 'react-native-svg';
4
+ import {ThemeCtx} from '../../../context/theme.context';
5
+ import {IconSVGProps} from '../../../interfaces/icon.interface';
6
+ import {HexColor} from '../../../models/hex-color.model';
7
+ import {Scale} from '../../../theme/scale/index';
8
+
9
+ export const ShareIcon = ({color, size = Scale.l}: IconSVGProps) => {
10
+ const context = useContext(ThemeCtx);
11
+ return (
12
+ <Svg width={size} height={size} viewBox="0 0 22 22" fill="none">
13
+ <Path
14
+ d="M16.5 8.80001C18.3225 8.80001 19.7999 7.32255 19.7999 5.50001C19.7999 3.67747 18.3225 2.20001 16.5 2.20001C14.6774 2.20001 13.2 3.67747 13.2 5.50001C13.2 5.63804 13.2084 5.7741 13.2249 5.90768L7.7908 8.62472C7.19729 8.05217 6.38974 7.70001 5.49995 7.70001C3.67741 7.70001 2.19995 9.17747 2.19995 11C2.19995 12.8226 3.67741 14.3 5.49995 14.3C6.38976 14.3 7.19732 13.9478 7.79084 13.3753L13.2249 16.0923C13.2084 16.2259 13.2 16.362 13.2 16.5C13.2 18.3226 14.6774 19.8 16.5 19.8C18.3225 19.8 19.7999 18.3226 19.7999 16.5C19.7999 14.6775 18.3225 13.2 16.5 13.2C15.6102 13.2 14.8026 13.5522 14.2091 14.1247L8.77502 11.4077C8.79148 11.2741 8.79995 11.138 8.79995 11C8.79995 10.862 8.79147 10.7259 8.77501 10.5923L14.2091 7.87527C14.8026 8.44784 15.6101 8.80001 16.5 8.80001Z"
15
+ fill={
16
+ color ? HexColor.of(color).toString() : context.colors.main['0']
17
+ }
18
+ />
19
+ </Svg>
20
+ );
21
+ };
@@ -138,6 +138,7 @@ export const IconSolidPreview = ({}: {}) => {
138
138
  <Icon style={'solid'} name={'user-group'} />
139
139
  <Icon style={'solid'} name={'users'} />
140
140
  <Icon style={'solid'} name={'xmark'} />
141
+ <Icon style={'solid'} name={'share'} />
141
142
  </View>
142
143
  </View>
143
144
  );
@@ -41,6 +41,7 @@ import {UserIcon as UserSolid} from './user/user.icon';
41
41
  import {UserGroupIcon as UserGroupSolid} from './user-group/user-group.icon';
42
42
  import {UsersIcon as UsersSolid} from './users/users-solid.icon';
43
43
  import {XMarkIcon as XMarkSolid} from './xmark/xmark.icon';
44
+ import { ShareIcon } from './share/share.icon';
44
45
 
45
46
  export const Solid = ({name, size, color}: IconNameInterface): JSX.Element => {
46
47
  const renderIcon = ({name}: IconNameInterface): React.ReactNode => {
@@ -125,6 +126,8 @@ export const Solid = ({name, size, color}: IconNameInterface): JSX.Element => {
125
126
  return <UserGroupSolid size={size} color={color} />;
126
127
  case 'xmark':
127
128
  return <XMarkSolid size={size} color={color} />;
129
+ case 'share':
130
+ return <ShareIcon size={size} color={color} />
128
131
  default:
129
132
  alert('The icon you want is not available');
130
133
  break;
@@ -40,4 +40,5 @@ export type IconNameType =
40
40
  | 'user'
41
41
  | 'user-group'
42
42
  | 'users'
43
- | 'xmark';
43
+ | 'xmark'
44
+ | 'share';