@liner-fe/icon 0.0.12 → 0.0.13
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/CHANGELOG.md +6 -0
- package/index.tsx +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/index.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
2
|
import { BasicColorType } from '@liner-fe/prism';
|
|
3
3
|
import { ArrowUpward } from './assets/arrow-upward';
|
|
4
4
|
import { ArrowDownward } from './assets/arrow-downward';
|
|
@@ -378,12 +378,12 @@ const iconSizeMap = {
|
|
|
378
378
|
xl: 40,
|
|
379
379
|
} as const;
|
|
380
380
|
|
|
381
|
-
export const Icon =
|
|
381
|
+
export const Icon = forwardRef<SVGSVGElement, {
|
|
382
382
|
fill?: boolean;
|
|
383
383
|
thick?: boolean;
|
|
384
384
|
name: keyof typeof IconMap;size?: keyof typeof iconSizeMap;
|
|
385
385
|
color?: BasicColorType;
|
|
386
|
-
}) => {
|
|
386
|
+
}>(({name, size = "m", ...props}, ref) => {
|
|
387
387
|
const IconComponent = IconMap[name];
|
|
388
|
-
return <IconComponent {...props} size={iconSizeMap[size]} />;
|
|
389
|
-
};
|
|
388
|
+
return <IconComponent {...props} ref={ref} size={iconSizeMap[size]} />;
|
|
389
|
+
});
|