Skip to content

Commit

Permalink
Merge branch 'main' into chore/optimize-components-build
Browse files Browse the repository at this point in the history
  • Loading branch information
fu050409 authored Feb 1, 2025
2 parents f05e9e6 + 397a760 commit 3c1efba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/components/_meta.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
["index", "image", "list", "resume_header"]
["index", "image", "list", "resume_header"]
4 changes: 1 addition & 3 deletions packages/components/image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import type { ImageProps } from './Image.types';

const Image = React.memo(
forwardRef<HTMLImageElement, ImageProps>((props: ImageProps, ref) => {
const { src, alt, width, height, style, onClick, className, userData } =
props;
const { src, alt, width, height, style, className, userData } = props;

return (
<img
Expand All @@ -14,7 +13,6 @@ const Image = React.memo(
width={width}
height={height}
style={style}
onClick={onClick}
className={className}
/>
);
Expand Down
10 changes: 4 additions & 6 deletions packages/components/list/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,14 @@ const List = memo(
data,
renderItem = (item: T) => <div>{String(item)}</div>,
}: ListProps<T>,
ref: React.ForwardedRef<HTMLDivElement>,
ref: React.ForwardedRef<HTMLUListElement>,
) => {
return (
<div ref={ref} role="list">
<ul ref={ref}>
{data.map((item, index) => (
<div key={index} role="listitem">
{renderItem(item, index)}
</div>
<li key={crypto.randomUUID()}>{renderItem(item, index)}</li>
))}
</div>
</ul>
);
},
),
Expand Down
2 changes: 1 addition & 1 deletion packages/components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@
"types": "./dist/index.d.ts"
}
}
}
}

0 comments on commit 3c1efba

Please sign in to comment.