Fix the small mechanical rules. [skip build]
This commit is contained in:
@@ -21,17 +21,18 @@ export const Icon = forwardRef<SVGSVGElement, IconProps>(
|
||||
) => {
|
||||
const pixelSize = ICON_PIXEL_SIZES[size];
|
||||
|
||||
let iconStyle = style;
|
||||
if (size === 'Inherit') {
|
||||
iconStyle = { width: '1em', height: '1em', ...style };
|
||||
} else if (pixelSize) {
|
||||
iconStyle = { width: pixelSize, height: pixelSize, ...style };
|
||||
}
|
||||
|
||||
return (
|
||||
<LucideIconComponent
|
||||
ref={ref}
|
||||
className={classNames(iconStyles.Icon({ size }), className)}
|
||||
style={
|
||||
size === 'Inherit'
|
||||
? { width: '1em', height: '1em', ...style }
|
||||
: pixelSize
|
||||
? { width: pixelSize, height: pixelSize, ...style }
|
||||
: style
|
||||
}
|
||||
style={iconStyle}
|
||||
// Lucide icons are stroke-based; solid fill turns faces (e.g. Smile) into blobs.
|
||||
// Emphasize selection with a heavier stroke instead.
|
||||
strokeWidth={filled ? 2.75 : 2}
|
||||
|
||||
Reference in New Issue
Block a user