Skip to content

Commit

Permalink
Revert changes to Stack.
Browse files Browse the repository at this point in the history
GitOrigin-RevId: 684438e26a0f3a9792ebc2e63a80a27fd63059ec
  • Loading branch information
cpojer committed Jan 30, 2025
1 parent dd9cc31 commit 028db44
Showing 1 changed file with 9 additions and 24 deletions.
33 changes: 9 additions & 24 deletions ui/Stack.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { css, cx } from '@emotion/css';
import { CSSProperties, HTMLAttributes, ReactNode, Ref, useMemo } from 'react';
import { CSSProperties, HTMLAttributes, ReactNode, Ref } from 'react';
import Breakpoints from './Breakpoints.tsx';

export type Gap = 1 | 2 | 4 | 16 | 24 | 32 | true;
Expand Down Expand Up @@ -64,9 +64,10 @@ export default function Stack({
}
}

const className = useMemo(
() =>
cx(
return (
<div
{...props}
className={cx(
baseStyle,
inline && inlineStyle,
adaptive && adaptiveStyle,
Expand All @@ -84,27 +85,11 @@ export default function Stack({
nowrap && nowrapStyle,
stretch && stretchStyle,
initialClassName,
),
[
adaptive,
alignCenter,
alignEnd,
alignNormal,
center,
initialClassName,
end,
flex1,
inline,
nowrap,
reverse,
selfCenter,
start,
stretch,
vertical,
],
)}
ref={ref}
style={style}
/>
);

return <div {...props} className={className} ref={ref} style={style} />;
}

const defaultGap = 8;
Expand Down

0 comments on commit 028db44

Please sign in to comment.