Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/lemon-jokes-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Remove sx prop support from the SelectPanel component.
6 changes: 6 additions & 0 deletions packages/react/src/SelectPanel/SelectPanel.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
}

.FilteredActionList {
/* inheriting height and maxHeight ensures that the FilteredActionList is never taller
than the Overlay (which would break scrolling the items) */
height: inherit;
max-height: inherit;
}
Expand Down Expand Up @@ -238,3 +240,7 @@
inset: 0;
background-color: var(--overlay-backdrop-bgColor);
}

.TextInput {
margin: var(--base-size-8);
}
6 changes: 1 addition & 5 deletions packages/react/src/SelectPanel/SelectPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ function Panel({
footer,
textInputProps,
overlayProps,
sx,
loading,
initialLoadingType = 'spinner',
className,
Expand Down Expand Up @@ -656,7 +655,7 @@ function Panel({

const extendedTextInputProps: Partial<TextInputProps> = useMemo(() => {
return {
sx: {m: 2},
className: classes.TextInput,
contrast: true,
leadingVisual: SearchIcon,
'aria-label': inputLabel,
Expand Down Expand Up @@ -861,9 +860,6 @@ function Panel({
: EMPTY_MESSAGE.description || EMPTY_MESSAGE.description,
}}
fullScreenOnNarrow={usingFullScreenOnNarrow}
// inheriting height and maxHeight ensures that the FilteredActionList is never taller
// than the Overlay (which would break scrolling the items)
Comment on lines -864 to -865
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should keep this comment, but move it near the relevant code in the css module?

sx={sx}
className={clsx(className, classes.FilteredActionList)}
/>
{footer ? (
Expand Down
Loading