Skip to content

Commit

Permalink
Merge pull request #48 from concord-consortium/187369359-add-space-pl…
Browse files Browse the repository at this point in the history
…aceholder

feat: Show (space) as placeholder when delimiter is a space [PT-187369359]
  • Loading branch information
dougmartin authored Apr 8, 2024
2 parents fc4c3ec + 43222f5 commit 98f24ef
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 98f24ef

Please sign in to comment.