-
Notifications
You must be signed in to change notification settings - Fork 374
Expand file tree
/
Copy pathbase.tsx
More file actions
45 lines (41 loc) · 924 Bytes
/
base.tsx
File metadata and controls
45 lines (41 loc) · 924 Bytes
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
import React from 'react';
import Svg, { Path, PathProps, SvgProps } from 'react-native-svg';
export type IconProps = Partial<SvgProps> &
Omit<RootPathProps, 'd'> & {
height?: number;
width?: number;
size?: number;
};
export const RootSvg = (props: IconProps) => {
const { children, height = 24, viewBox = '0 0 24 24', width = 24 } = props;
return (
<Svg
{...{
height,
viewBox,
width,
}}
{...props}
>
{children}
</Svg>
);
};
export type RootPathProps = Pick<PathProps, 'd'> & {
pathFill?: SvgProps['fill'];
pathOpacity?: PathProps['opacity'];
};
export const RootPath = (props: RootPathProps) => {
const { d, pathFill = 'black', pathOpacity } = props;
return (
<Path
{...{
clipRule: 'evenodd',
d,
fill: pathFill,
fillRule: 'evenodd',
opacity: pathOpacity,
}}
/>
);
};