File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717.search {
1818 width : 100% ;
19- padding : 9px 12 px 9px 38px ;
19+ padding : 9px 34 px 9px 38px ;
2020 background : var (--bg-card );
2121 border : 1px solid var (--border-strong );
2222 border-radius : 8px ;
3030.search : focus { border-color : var (--accent ); box-shadow : 0 0 0 3px var (--accent-light ); }
3131.search ::placeholder { color : var (--text-secondary ); }
3232
33+ .clearBtn {
34+ position : absolute;
35+ right : 10px ;
36+ top : 50% ;
37+ transform : translateY (-50% );
38+ background : none;
39+ border : none;
40+ padding : 0 2px ;
41+ font-size : 16px ;
42+ line-height : 1 ;
43+ color : var (--text-secondary );
44+ cursor : pointer;
45+ transition : color 0.1s ;
46+ }
47+ .clearBtn : hover { color : var (--text-primary ); }
48+
3349/* ── Table scroll wrapper ─────────────────────────────── */
3450.tableScroll { overflow-x : auto; }
3551.tableScroll table { table-layout : fixed; width : 100% ; }
Original file line number Diff line number Diff line change @@ -68,6 +68,9 @@ export function CatalogPage() {
6868 onChange = { e => setQuery ( e . target . value ) }
6969 autoComplete = "off"
7070 />
71+ { query && (
72+ < button className = { styles . clearBtn } onClick = { ( ) => setQuery ( '' ) } aria-label = "Clear search" > ×</ button >
73+ ) }
7174 </ div >
7275 < p className = "count-label" >
7376 Showing < b > { filtered . length . toLocaleString ( ) } </ b > of < b > { packages . length . toLocaleString ( ) } </ b > packages
You can’t perform that action at this time.
0 commit comments