@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @liner-fe/icon
2
2
 
3
+ ## 0.0.13
4
+
5
+ ### Patch Changes
6
+
7
+ - b264535: [refactor] Icon 컴포넌트 forwardRef 지원하도록 수정
8
+
3
9
  ## 0.0.12
4
10
 
5
11
  ### Patch Changes
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 = ({name, size = "m", ...props}: {
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
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/icon",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "scripts": {
5
5
  "build": ""
6
6
  },