File tree Expand file tree Collapse file tree 3 files changed +36
-25
lines changed
packages/react/src/deprecated/FilteredSearch Expand file tree Collapse file tree 3 files changed +36
-25
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ ' @primer/react ' : major
3+ ---
4+
5+ Remove support for ` sx ` prop from ` deprecated/FilteredSearch `
Original file line number Diff line number Diff line change 1+ .FilteredSearch {
2+ display : flex;
3+ align-items : stretch;
4+
5+ & summary ,
6+ & > button {
7+ border-radius : 0 ;
8+ border-top-left-radius : var (--borderRadius-medium );
9+ border-bottom-left-radius : var (--borderRadius-medium );
10+ border-right : 0 ;
11+ }
12+
13+ /* stylelint-disable-next-line selector-class-pattern */
14+ & : global (.TextInput-wrapper ) {
15+ border-radius : 0 ;
16+ border-top-right-radius : var (--borderRadius-medium );
17+ border-bottom-right-radius : var (--borderRadius-medium );
18+ }
19+ }
Original file line number Diff line number Diff line change 1- import styled from 'styled-components'
2- import { get } from '../../constants'
3- import type { SxProp } from '../../sx'
4- import sx from '../../sx'
5- import type { ComponentProps } from '../../utils/types'
1+ import { clsx } from 'clsx'
2+ import classes from './FilteredSearch.module.css'
3+
4+ type FilteredSearchProps = React . HTMLAttributes < HTMLElement >
65
76/**
87 * @deprecated A new filter component is in progress.
98 * Until the new filter component is ready, you can use Button + TextInput + ActionList to reproduce this pattern.
109 */
11- const FilteredSearch = styled . div < SxProp > `
12- display: flex;
13- align-items: stretch;
14-
15- summary,
16- > button {
17- border-radius: 0;
18- border-top-left-radius: ${ get ( 'radii.2' ) } ;
19- border-bottom-left-radius: ${ get ( 'radii.2' ) } ;
20- border-right: 0;
21- }
22- .TextInput-wrapper {
23- border-radius: 0;
24- border-top-right-radius: ${ get ( 'radii.2' ) } ;
25- border-bottom-right-radius: ${ get ( 'radii.2' ) } ;
26- }
27-
28- ${ sx }
29- `
10+ function FilteredSearch ( { children, className, ...rest } : FilteredSearchProps ) {
11+ return (
12+ < div { ...rest } className = { clsx ( classes . FilteredSearch , className ) } >
13+ { children }
14+ </ div >
15+ )
16+ }
3017
31- export type FilteredSearchProps = ComponentProps < typeof FilteredSearch >
18+ export type { FilteredSearchProps }
3219export default FilteredSearch
You can’t perform that action at this time.
0 commit comments