File tree Expand file tree Collapse file tree 6 files changed +24
-18
lines changed Expand file tree Collapse file tree 6 files changed +24
-18
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import type { Equals } from "tsafe";
66import { cx } from "../tools/cx" ;
77import { fr } from "../fr" ;
88import { SearchButton } from "./SearchButton" ;
9+ import "../assets/search-bar.css" ;
910
1011export type SearchBarProps = {
1112 className ?: string ;
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ import { is } from "tsafe/is";
88import { useConstCallback } from "../tools/powerhooks/useConstCallback" ;
99import { observeInputValue } from "../tools/observeInputValue" ;
1010import { id } from "tsafe/id" ;
11- import { cx } from "../tools/cx" ;
12- import "../assets/search-bar-button.css" ;
1311
1412export type SearchButtonProps = {
1513 searchInputId : string ;
@@ -150,12 +148,17 @@ export function SearchButton(props: SearchButtonProps) {
150148
151149 return (
152150 < button
153- className = { cx (
154- onClick_props === undefined && "controlled-search-bar-button" ,
155- fr . cx ( "fr-btn" )
156- ) }
151+ className = { fr . cx ( "fr-btn" ) }
157152 title = { t ( "label" ) }
158153 onClick = { onClick }
154+ style = {
155+ onClick_props !== undefined
156+ ? undefined
157+ : {
158+ "position" : "absolute" ,
159+ "right" : 0
160+ }
161+ }
159162 >
160163 { t ( "label" ) }
161164 </ button >
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+
2+ .fr-search-bar {
3+ position : relative;
4+ }
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { Header } from "../dist/Header";
33import { MainNavigation } from "../dist/MainNavigation" ;
44import { sectionName } from "./sectionName" ;
55import { getStoryFactory } from "./getStory" ;
6+ import { GlobalStyles } from "tss-react" ;
67import placeholder_9x16ImgUrl from "./assets/placeholder.9x16.png" ;
78import placeholder_16x9ImgUrl from "./assets/placeholder.16x9.png" ;
89
@@ -207,6 +208,13 @@ function MySearchInput(props: MySearchInputProps) {
207208
208209 return (
209210 < >
211+ < GlobalStyles
212+ styles = { {
213+ ".fr-container" : {
214+ "overflow" : "visible"
215+ }
216+ } }
217+ />
210218 < input
211219 ref = { setInputElement }
212220 className = { className }
@@ -225,7 +233,7 @@ function MySearchInput(props: MySearchInputProps) {
225233 < p
226234 style = { {
227235 "position" : "absolute" ,
228- "top" : 120 ,
236+ "top" : 81 ,
229237 "left" : 0
230238 } }
231239 >
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ export const WithControlledInput = getStory(
7979 < p
8080 style = { {
8181 "position" : "absolute" ,
82- "top" : 84
82+ "top" : 43
8383 } }
8484 >
8585 Search results for: { search }
You can’t perform that action at this time.
0 commit comments