Skip to content

Commit

Permalink
Removes cap on the max length
Browse files Browse the repository at this point in the history
Changes the default delimeter to space.
  • Loading branch information
eireland committed Apr 2, 2024
1 parent 9756928 commit a5c091d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import "./app.scss";
type GenerationMode = "ready" | "playing" | "paused" | "steping";

const AnyStartingState = "(any)";
const MaxLengthLimit = 25;
const AnimationDelay = 1000;

type SequenceGroup = {
Expand Down Expand Up @@ -55,7 +54,7 @@ const SequenceOutputHeader = ({ group }: { group: SequenceGroup }) => {

export const App = () => {
const [lengthLimit, setLengthLimit] = useState<number | undefined>(5);
const [delimiter, setDelimiter] = useState("");
const [delimiter, setDelimiter] = useState(" ");
const [startingState, setStartingState] = useState("");
const [sequenceGroups, setSequenceGroups] = useState<SequenceGroup[]>([]);
const [highlightNode, setHighlightNode] = useState<Node>();
Expand Down Expand Up @@ -203,7 +202,7 @@ export const App = () => {

const handleChangeLengthLimit = (e: React.ChangeEvent<HTMLInputElement>) => {
const numberValue = parseInt(e.target.value, 10);
setLengthLimit(isNaN(numberValue) ? undefined : Math.min(MaxLengthLimit, numberValue));
setLengthLimit(isNaN(numberValue) ? undefined : numberValue);
};

const handleChangeDelimiter = (e: React.ChangeEvent<HTMLInputElement>) => {
Expand Down Expand Up @@ -276,7 +275,6 @@ export const App = () => {
value={lengthLimit}
onChange={handleChangeLengthLimit}
min={1}
max={MaxLengthLimit}
disabled={disabled}
/>
</div>
Expand All @@ -286,7 +284,7 @@ export const App = () => {
<input type="text"
onChange={handleChangeDelimiter}
value={delimiter}
placeholder="(none)"
placeholder="(space)"
maxLength={3}
disabled={disabled}
/>
Expand Down

0 comments on commit a5c091d

Please sign in to comment.