Skip to content

Commit

Permalink
chore: FloatAreaのclass名生成をmemo化
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiM committed Jan 21, 2025
1 parent b47c0fd commit 02985e3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/smarthr-ui/src/components/FloatArea/FloatArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,10 @@ export const FloatArea: FC<Props & ElementProps> = ({
...rest
}) => {
const styleAttr = useMemo(() => ({ ...style, zIndex }), [style, zIndex])
const actualClassName = useMemo(() => floatArea({ bottom, className }), [bottom, className])

return (
<Base
{...rest}
style={styleAttr}
layer={3}
padding={1}
className={floatArea({ bottom, className })}
>
<Base {...rest} style={styleAttr} layer={3} padding={1} className={actualClassName}>
<Cluster gap={1}>
{tertiaryButton}
<div className="shr-ms-auto">
Expand Down

0 comments on commit 02985e3

Please sign in to comment.