react-native-ico-rpg-game 4.1.4 → 5.1.2

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/README.md CHANGED
@@ -23,6 +23,7 @@ render() {
23
23
  <Icon name="all-for-one" />
24
24
  <Icon name="alligator-clip" height="40" width="40" />
25
25
  <Icon name="ammo-bag" color="red" />
26
+ <Icon name="ammo-bag" colors={{ "#000000": "#FFFFFF" }} />
26
27
  <Icon name="alligator-clip" badge="10" />
27
28
  <Icon name="alligator-clip" badge={{value: 'A', fontSize: 25, radius: 22, position:'top_left', color:'orange', backgroundColor:'blue'}}/>
28
29
  <Icon name="all-for-one" background="circle" />
@@ -69,13 +70,14 @@ Returns a SvgXml icon by name and group.
69
70
  ------|----------|---------------|-------------|---------
70
71
  name | no | | name of icon | "all-for-one"
71
72
  color | yes | | line color, css style | "#00ff00", "#0f0", "green"
73
+ colors | yes | | replace colors | {"#FFFFFF": "#000000"} // white to black
72
74
  width | yes | 20 | width of the icon | 40
73
75
  height | yes | 20 | height of the icon | 40
74
- background | no | | background type | "circle"
75
- background | no | | background object | {type: "circle", color: 'yellow'}
76
- badge | no | | badge string | "10"
77
- badge | no | | badge object | {value: 'A', fontSize: 25, radius: 22, position:'top_left', color:'orange', backgroundColor:'blue'}
78
- ...rest | no | | other props | style={{backgroundColor: "#00f"}}
76
+ background | yes | | background type | "circle"
77
+ background | yes | | background object | {type: "circle", color: 'yellow'}
78
+ badge | yes | | badge string | "10"
79
+ badge | yes | | badge object | {value: 'A', fontSize: 25, radius: 22, position:'top_left', color:'orange', backgroundColor:'blue'}
80
+ ...rest | yes | | other props | style={{backgroundColor: "#00f"}}
79
81
 
80
82
  ## Icons Made by
81
83
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "react-native-ico-rpg-game",
3
- "version": "4.1.4",
3
+ "version": "5.1.2",
4
4
  "description": "Rpg Game Icons for React Native",
5
5
  "main": "src/index.jsx",
6
6
  "types": "typings.d.ts",
7
7
  "dependencies": {
8
- "react-svg-main": "^3.0.1"
8
+ "react-svg-main": "^4.0.1"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
package/typings.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  declare module 'react-native-ico-rpg-game' {
2
2
  import { ReactNode } from 'react';
3
+ import { SvgProps, AdditionalProps } from 'react-native-svg';
3
4
 
4
5
  type iconNames = 'acid' |
5
6
  'acorn' |
@@ -497,8 +498,12 @@ declare module 'react-native-ico-rpg-game' {
497
498
  'zebra-shield' |
498
499
  'zigzag-leaf';
499
500
 
501
+ type iconColors = '#000000';
502
+
500
503
  type backgroundType = 'circle' | 'rect' | 'button';
501
504
 
505
+ type colorsType = Record<iconColors, string>;
506
+
502
507
  type positionType = 'top' | 'bottom' | 'right' | 'left' |
503
508
  'top_right' | 'top_left' | 'bottom_right' | 'bottom_left';
504
509
 
@@ -514,6 +519,7 @@ declare module 'react-native-ico-rpg-game' {
514
519
  fontSize?: string;
515
520
  position?: positionType;
516
521
  color?: string;
522
+ colors: colorsType;
517
523
  backgroundColor?: string;
518
524
  radius?: number;
519
525
  };
@@ -523,12 +529,13 @@ declare module 'react-native-ico-rpg-game' {
523
529
  width?: number;
524
530
  height?: number;
525
531
  color?: string;
532
+ colors: colorsType;
526
533
  stroke?: number;
527
534
  background?: backgroundType | backgroundTypeObj;
528
535
  badge?: number | string | badgeTypeObj;
529
536
  }
530
537
 
531
- const Icon: (props: IconProps) => ReactNode;
538
+ const Icon: (props: IconProps & SvgProps & AdditionalProps) => ReactNode;
532
539
 
533
540
  export { iconNames };
534
541
  export default Icon;