@muja-ui/native 0.2.0 → 0.3.0
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/dist/index.cjs +2 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -175,6 +175,14 @@ interface IconProps {
|
|
|
175
175
|
size?: number;
|
|
176
176
|
/** Semantic color token. Defaults to the current text color. */
|
|
177
177
|
color?: SemanticColorToken;
|
|
178
|
+
/**
|
|
179
|
+
* Escape hatch for a already-resolved colour string, overriding `color`.
|
|
180
|
+
*
|
|
181
|
+
* Prefer `color`. This exists for platform APIs that hand you a colour rather
|
|
182
|
+
* than letting you pick one — React Navigation's `tabBarIcon({ color })` is
|
|
183
|
+
* the case it was added for. Do not use it to introduce new colour values.
|
|
184
|
+
*/
|
|
185
|
+
tint?: string;
|
|
178
186
|
/** Accessible label. Without it the icon is treated as decorative. */
|
|
179
187
|
label?: string;
|
|
180
188
|
strokeWidth?: number;
|
|
@@ -188,7 +196,7 @@ interface IconProps {
|
|
|
188
196
|
* <Icon icon={CheckIcon} color="success" />
|
|
189
197
|
* ```
|
|
190
198
|
*/
|
|
191
|
-
declare function Icon({ icon, size, color, label, strokeWidth, style, }: IconProps): react.JSX.Element | null;
|
|
199
|
+
declare function Icon({ icon, size, color, tint, label, strokeWidth, style, }: IconProps): react.JSX.Element | null;
|
|
192
200
|
|
|
193
201
|
interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
194
202
|
variant?: Variant;
|
package/dist/index.d.ts
CHANGED
|
@@ -175,6 +175,14 @@ interface IconProps {
|
|
|
175
175
|
size?: number;
|
|
176
176
|
/** Semantic color token. Defaults to the current text color. */
|
|
177
177
|
color?: SemanticColorToken;
|
|
178
|
+
/**
|
|
179
|
+
* Escape hatch for a already-resolved colour string, overriding `color`.
|
|
180
|
+
*
|
|
181
|
+
* Prefer `color`. This exists for platform APIs that hand you a colour rather
|
|
182
|
+
* than letting you pick one — React Navigation's `tabBarIcon({ color })` is
|
|
183
|
+
* the case it was added for. Do not use it to introduce new colour values.
|
|
184
|
+
*/
|
|
185
|
+
tint?: string;
|
|
178
186
|
/** Accessible label. Without it the icon is treated as decorative. */
|
|
179
187
|
label?: string;
|
|
180
188
|
strokeWidth?: number;
|
|
@@ -188,7 +196,7 @@ interface IconProps {
|
|
|
188
196
|
* <Icon icon={CheckIcon} color="success" />
|
|
189
197
|
* ```
|
|
190
198
|
*/
|
|
191
|
-
declare function Icon({ icon, size, color, label, strokeWidth, style, }: IconProps): react.JSX.Element | null;
|
|
199
|
+
declare function Icon({ icon, size, color, tint, label, strokeWidth, style, }: IconProps): react.JSX.Element | null;
|
|
192
200
|
|
|
193
201
|
interface ButtonProps extends Omit<PressableProps, 'style' | 'children'> {
|
|
194
202
|
variant?: Variant;
|
package/dist/index.js
CHANGED
|
@@ -265,6 +265,7 @@ function Icon({
|
|
|
265
265
|
icon,
|
|
266
266
|
size = 20,
|
|
267
267
|
color = "text",
|
|
268
|
+
tint,
|
|
268
269
|
label,
|
|
269
270
|
strokeWidth = 2,
|
|
270
271
|
style
|
|
@@ -293,7 +294,7 @@ function Icon({
|
|
|
293
294
|
Path,
|
|
294
295
|
{
|
|
295
296
|
d,
|
|
296
|
-
stroke: theme.colors[color],
|
|
297
|
+
stroke: tint ?? theme.colors[color],
|
|
297
298
|
strokeWidth,
|
|
298
299
|
strokeLinecap: "round",
|
|
299
300
|
strokeLinejoin: "round"
|