Skip to content

Commit f2ee104

Browse files
committed
Fix previous release
1 parent f3c14a5 commit f2ee104

File tree

6 files changed

+24
-18
lines changed

6 files changed

+24
-18
lines changed

src/SearchBar/SearchBar.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { Equals } from "tsafe";
66
import { cx } from "../tools/cx";
77
import { fr } from "../fr";
88
import { SearchButton } from "./SearchButton";
9+
import "../assets/search-bar.css";
910

1011
export type SearchBarProps = {
1112
className?: string;

src/SearchBar/SearchButton.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { is } from "tsafe/is";
88
import { useConstCallback } from "../tools/powerhooks/useConstCallback";
99
import { observeInputValue } from "../tools/observeInputValue";
1010
import { id } from "tsafe/id";
11-
import { cx } from "../tools/cx";
12-
import "../assets/search-bar-button.css";
1311

1412
export 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>

src/assets/search-bar-button.css

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/assets/search-bar.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
.fr-search-bar {
3+
position: relative;
4+
}

stories/Header.stories.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Header } from "../dist/Header";
33
import { MainNavigation } from "../dist/MainNavigation";
44
import { sectionName } from "./sectionName";
55
import { getStoryFactory } from "./getStory";
6+
import { GlobalStyles } from "tss-react";
67
import placeholder_9x16ImgUrl from "./assets/placeholder.9x16.png";
78
import 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
>

stories/SearchBar.stories.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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}

0 commit comments

Comments
 (0)