@hugeicons/react-native 1.0.2 → 1.0.3

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 (2) hide show
  1. package/README.md +24 -11
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -85,18 +85,31 @@ function MyComponent() {
85
85
 
86
86
  | Prop | Type | Default | Description |
87
87
  |------|------|---------|-------------|
88
- | `icon` | `[string, Record<string, any>][]` | Required | The main icon to display (array of SVG elements and their attributes) |
89
- | `size` | `number \| string` | `24` | Icon size in pixels. Must be a positive number. String values will be parsed to numbers |
90
- | `strokeWidth` | `number \| undefined` | `undefined` | Width of the icon strokes (works with stroke-style icons) |
91
- | `altIcon` | `[string, Record<string, any>][]` | `undefined` | Alternative icon that can be used for states, interactions, or animations |
88
+ | `icon` | `IconType` | Required | The main icon to display |
89
+ | `altIcon` | `IconType` | - | Alternative icon that can be used for states, interactions, animations, or dynamic icon swapping |
92
90
  | `showAlt` | `boolean` | `false` | When true, displays the altIcon instead of the main icon |
93
- | `color` | `string` | `black` | Icon color (any valid React Native color value) |
94
- | `style` | `StyleProp<ViewStyle>` | - | Additional styles for the icon container |
95
-
96
- Note:
97
- - The component accepts all standard React Native View props which will be passed to the container View.
98
- - The `size` prop accepts both numbers and strings, but strings will be parsed to numbers and must result in a positive number.
99
- - Icon arrays are tuples of `[elementName: string, attributes: Record<string, any>][]` representing SVG elements.
91
+ | `size` | `number` | `24` | Icon size in pixels |
92
+ | `color` | `string` | `currentColor` | Icon color (CSS color value) |
93
+ | `strokeWidth` | `number` | `undefined` | Width of the icon strokes. When used with `absoluteStrokeWidth`, the stroke width will be automatically scaled relative to the icon size |
94
+ | `absoluteStrokeWidth` | `boolean` | `false` | When true, the stroke width will be scaled relative to the icon size to maintain visual consistency across different sizes |
95
+
96
+ ## Changelog
97
+
98
+ ### v1.0.3
99
+ - Added `absoluteStrokeWidth` prop for consistent stroke width scaling
100
+ - Improved stroke width handling by applying it at the SVG level
101
+ - Enhanced TypeScript types and documentation
102
+
103
+ ### v1.0.2
104
+ - Added `altIcon` prop for alternate icon support
105
+ - Added `showAlt` prop for conditional icon display
106
+ - Improved TypeScript types and documentation
107
+
108
+ ### v1.0.0
109
+ - Initial release
110
+ - Basic icon rendering functionality
111
+ - Support for customization (size, color, alternate icons)
112
+ - Full TypeScript support
100
113
 
101
114
  ## Examples
102
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hugeicons/react-native",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "HugeIcons Pro React Native Component Library https://hugeicons.com",
5
5
  "homepage": "https://hugeicons.com",
6
6
  "amdName": "hugeicons-pro-react-native",