Skip to content

Commit

Permalink
feat: Show (space) as placeholder when delimiter is a space [PT-18736…
Browse files Browse the repository at this point in the history
  • Loading branch information
dougmartin committed Apr 6, 2024
1 parent fc4c3ec commit 43222f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,9 @@ export const App = () => {
const onPlayClick = generationMode === "playing"
? handlePause
: (generationMode === "paused" ? handleResume : handlePlay);
const delimiterIsSpace = delimiter === " ";
const delimiterValue = delimiterIsSpace ? "" : delimiter;
const delimiterPlaceholder = delimiterIsSpace ? "(space)" : "(none)";

return (
<div className="generate">
Expand Down Expand Up @@ -328,8 +331,8 @@ export const App = () => {
<label>Delimiter:</label>
<input className="bordered" type="text"
onChange={handleChangeDelimiter}
value={delimiter}
placeholder="(none)"
value={delimiterValue}
placeholder={delimiterPlaceholder}
maxLength={3}
disabled={disabled}
/>
Expand Down

0 comments on commit 43222f5

Please sign in to comment.