Skip to content

Commit c7285d5

Browse files
authored
fix: CardView height in ActionBar (#8373)
1 parent 3423f9c commit c7285d5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

packages/@react-spectrum/s2/src/CardView.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,13 +178,15 @@ const cardViewStyles = style({
178178
isFocusVisible: 'solid'
179179
}
180180
},
181-
outlineOffset: -2
181+
outlineOffset: -2,
182+
height: {
183+
isActionBar: 'full'
184+
}
182185
}, getAllowedOverrides({height: true}));
183186

184187
const wrapperStyles = style({
185188
position: 'relative',
186-
overflow: 'clip',
187-
size: 'fit'
189+
overflow: 'clip'
188190
}, getAllowedOverrides({height: true}));
189191

190192
export const CardViewContext = createContext<ContextValue<Partial<CardViewProps<any>>, DOMRefValue<HTMLDivElement>>>(null);
@@ -288,7 +290,7 @@ export const CardView = /*#__PURE__*/ (forwardRef as forwardRefType)(function Ca
288290
scrollPadding: options.minSpace.height,
289291
scrollPaddingBottom: actionBarHeight + options.minSpace.height
290292
}}
291-
className={renderProps => (!props.renderActionBar ? UNSAFE_className : '') + cardViewStyles({...renderProps, isLoading: props.loadingState === 'loading'}, !props.renderActionBar ? styles : undefined)}>
293+
className={renderProps => (!props.renderActionBar ? UNSAFE_className : '') + cardViewStyles({...renderProps, isLoading: props.loadingState === 'loading', isActionBar: !!props.renderActionBar}, !props.renderActionBar ? styles : undefined)}>
292294
{renderer}
293295
</AriaGridList>
294296
</ImageCoordinator>

0 commit comments

Comments
 (0)