Skip to content

Commit bd0513a

Browse files
authored
[Enhancement] Split placeholder by newline and add title for tooltip (#252)
* Split placeholder by newline and add title for tooltip * Remove unused imports
1 parent becd0ae commit bd0513a

File tree

1 file changed

+2
-0
lines changed
  • packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormTextInput

1 file changed

+2
-0
lines changed

packages/docusaurus-theme-openapi-docs/src/theme/ApiDemoPanel/FormTextInput/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@ interface Props {
1717
}
1818

1919
function FormTextInput({ value, placeholder, password, onChange }: Props) {
20+
placeholder = placeholder?.split("\n")[0];
2021
return (
2122
<input
2223
className={styles.input}
2324
type={password ? "password" : "text"}
2425
placeholder={placeholder}
26+
title={placeholder}
2527
value={value}
2628
onChange={onChange}
2729
autoComplete="off"

0 commit comments

Comments
 (0)