Skip to content

Commit af8c042

Browse files
committed
Fix search input in color helper
1 parent 132c06e commit af8c042

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

stories/ColorHelper/ColorDecisionCard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from "react";
2-
import type { ColorDecisionAndCorrespondingOption } from "../../src/scripts/build/cssToTs/colorDecisionAndCorrespondingOptions";
2+
import type { ColorDecisionAndCorrespondingOption } from "../../scripts/build/cssToTs/colorDecisionAndCorrespondingOptions";
33
import { useColors } from "../../dist/useColors";
44
import { fr } from "../../dist/fr";
55
import Tooltip from "@mui/material/Tooltip";

stories/ColorHelper/ColorHelper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { useState, useRef } from "react";
22
import { CallOut } from "../../dist/CallOut";
33
import { colorDecisionAndCorrespondingOptions } from "../../dist/fr/generatedFromCss/colorDecisionAndCorrespondingOptions";
4-
import type { ColorDecisionAndCorrespondingOption } from "../../src/scripts/build/cssToTs/colorDecisionAndCorrespondingOptions";
4+
import type { ColorDecisionAndCorrespondingOption } from "../../scripts/build/cssToTs/colorDecisionAndCorrespondingOptions";
55
import { fr } from "../../dist/fr";
66
import { createUseDebounce } from "powerhooks/useDebounce";
77
import { Fzf } from "fzf";

stories/ColorHelper/Search.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,17 @@ export function Search(props: Props) {
9191
<SearchBar
9292
className={classes.searchBar}
9393
label="Filter by color code (e.g. #c9191e), CSS variable name (e.g. --text-active-red-marianne) or something else..."
94-
nativeInputProps={{
95-
"ref": inputElement => setInputElement(inputElement),
96-
"value": search,
97-
"onChange": event => onSearchChange(event.target.value)
98-
}}
94+
renderInput={({ className, id, placeholder, type }) =>
95+
<input
96+
ref={setInputElement}
97+
value={search}
98+
onChange={event => onSearchChange(event.target.value)}
99+
className={className}
100+
id={id}
101+
placeholder={placeholder}
102+
type={type}
103+
/>
104+
}
99105
/>
100106
<Button
101107
className={classes.filterButton}

0 commit comments

Comments
 (0)