mirror of
https://github.com/lucide-icons/lucide.git
synced 2026-11-13 13:48:26 +00:00
* Add typecheck jobs
* update lockfile
* Fix types
* Fix lucide solid types
* Fix type lucide-react-native
* fix: align react-native svg mock children typing
* fix: format build font spec
* fix: restore shared workflow and RN class context
* fix: restore lucide-react build typecheck
* fix: keep react build generating icons
* fix: preserve builder color prop types
* test: cover RN provider class merge
* Revert 711255b
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
45 lines
885 B
Plaintext
45 lines
885 B
Plaintext
---
|
|
import buildLucideIconNode from './utils/buildLucideIconNode';
|
|
import type { IconProps as Props } from './types';
|
|
import { hasA11yProp } from './utils/hasA11yProp';
|
|
|
|
const {
|
|
color = 'currentColor',
|
|
size = 24,
|
|
width,
|
|
height,
|
|
'stroke-width': strokeWidth = 2,
|
|
absoluteStrokeWidth = false,
|
|
nonScalingStroke = false,
|
|
iconNode = [],
|
|
icon = {
|
|
node: iconNode,
|
|
aliases: [],
|
|
size: 24,
|
|
},
|
|
class: className,
|
|
...rest
|
|
} = Astro.props;
|
|
|
|
const [, builtIconAttributes, builtIconNode = []] = buildLucideIconNode(icon, {
|
|
color,
|
|
width: width ?? size,
|
|
height: height ?? size,
|
|
strokeWidth,
|
|
absoluteStrokeWidth,
|
|
nonScalingStroke,
|
|
className,
|
|
hasA11yProp: hasA11yProp(rest),
|
|
});
|
|
|
|
const iconAttributes = {
|
|
...builtIconAttributes,
|
|
...rest,
|
|
};
|
|
---
|
|
|
|
<svg {...iconAttributes}>
|
|
{builtIconNode.map(([Tag, attrs]) => <Tag {...attrs} />)}
|
|
<slot />
|
|
</svg>
|