Skip to content

Commit

Permalink
feat: update styles
Browse files Browse the repository at this point in the history
  • Loading branch information
d4rkm3z committed May 22, 2024
1 parent e782f27 commit e8557dd
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 43 deletions.
88 changes: 47 additions & 41 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { ChangeEvent, useCallback, useReducer, useState } from "react";
import { ChangeEvent, useReducer, useState } from "react";
import { InputGroup } from "@/components/ui/input-group";
import { Label } from "@/components/ui/label";
import { Input } from "@/components/ui/input";
Expand Down Expand Up @@ -57,50 +57,56 @@ export default function Home() {
</div>
</div>

<InputGroup
length={INPUT_SIZE}
label={"Известные позиции букв"}
getValues={availablePositionsHandler}
/>
<InputGroup
length={INPUT_SIZE}
label={"Известные буквы с неверной позицией"}
getValues={incorrectPositionsHandler}
/>

<div className="flex flex-nowrap flex-col items-center w-80 min-w-80 gap-4">
<Label>Известные буквы</Label>

<div className="flex w-full">
<Input
type="text"
value={state.availableLetters}
onChange={availableLettersHandler}
<div className="flex flex-row gap-10 flex-nowrap justify-center w-full">
<div className="border rounded-2xl flex flex-col flex-nowrap items-center gap-14 p-10 flex-2 self-start">
<InputGroup
length={INPUT_SIZE}
label={"Известные позиции букв"}
getValues={availablePositionsHandler}
/>
</div>
</div>

<div className="flex flex-nowrap flex-col items-center w-80 min-w-80 gap-4">
<Label>Отсутствующие буквы в искомом слове</Label>
<div className="flex w-full">
<Input
type="text"
value={state.unavailableLetters}
onChange={unavailableLettersHandler}
<InputGroup
length={INPUT_SIZE}
label={"Известные буквы с неверной позицией"}
getValues={incorrectPositionsHandler}
/>
</div>
</div>

<div>
<Button variant={"default"} className="w-60" onClick={clickHandler}>
Запуск
</Button>
</div>
<div className="flex flex-nowrap flex-col items-center w-80 min-w-80 gap-4">
<Label>Известные буквы</Label>

<div className="flex w-full">
<Input
type="text"
value={state.availableLetters}
onChange={availableLettersHandler}
/>
</div>
</div>

<div className="flex flex-nowrap flex-col items-center w-80 min-w-80 gap-4">
<Label>Отсутствующие буквы в искомом слове</Label>
<div className="flex w-full">
<Input
type="text"
value={state.unavailableLetters}
onChange={unavailableLettersHandler}
/>
</div>
</div>

<div>
<Button variant={"default"} className="w-60" onClick={clickHandler}>
Запуск
</Button>
</div>
</div>

<div className="flex flex-col align-middle gap-y-3 text-center">
{words.map((item) => (
<Label key={item}>{item.toUpperCase()}</Label>
))}
<div className="border rounded-2xl flex flex-col flex-nowrap items-center gap-14 p-10 w-60 scroll-auto">
<div className="flex flex-col align-middle gap-y-3 text-center">
{words.map((item) => (
<Label key={item}>{item.toUpperCase()}</Label>
))}
</div>
</div>
</div>
</main>
);
Expand Down
2 changes: 0 additions & 2 deletions src/lib/search-words.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ function searchWord(data: SearchInputData) {
return acc;
}, []);

console.log({ result, data });

return result;
}

Expand Down

0 comments on commit e8557dd

Please sign in to comment.