-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
651f0c1
commit efa3f37
Showing
2 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,39 @@ | ||
import ApiUrl from '@/components/ApiUrl'; | ||
'use client'; | ||
|
||
import { Card, CardHeader, CardBody } from '@nextui-org/card'; | ||
import { Button, Spacer } from '@nextui-org/react'; | ||
import { IconArrowUp, IconTrash } from '@tabler/icons-react'; | ||
import { TextArea } from '@/components/Textearea'; | ||
|
||
export default function Page() { | ||
return ( | ||
<div className="flex flex-col h-screen overflow-hidden"> | ||
<ApiUrl /> | ||
<div className=" w-screen h-screen glassmorphism"> | ||
<Card className="w-full h-full fixed py-2 bg-transparent "> | ||
<div className=" flex"> | ||
<Button className=" bg-transparent " isIconOnly> | ||
<IconTrash color="gray" size={24} /> | ||
</Button> | ||
<CardHeader className="text-center fonst-bold text-white"> | ||
Chat with AI | ||
</CardHeader> | ||
</div> | ||
<Spacer y={10} /> | ||
<CardBody className="flex-grow text-white font-bold"></CardBody> | ||
<div className="flex bg-gray-200 flex-grow items-center p-2 overflow-scroll"> | ||
<TextArea | ||
type="text" | ||
placeholder="Type your question..." | ||
minRows={1} | ||
maxRows={4} | ||
/> | ||
<Button | ||
isIconOnly | ||
className="bg-secondary py-1 mr-0 mb-2 ml-2 h-[30px] w-[32px] rounded-full" | ||
> | ||
<IconArrowUp size={30} stroke={3} /> | ||
</Button> | ||
</div> | ||
</Card> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { extendVariants } from '@nextui-org/react'; | ||
|
||
const TextArea = ({ ...props }) => { | ||
return ( | ||
<ExtendedTextarea | ||
className={'mb-2'} | ||
radius="xs" | ||
labelPlacement="outside" | ||
{...props} | ||
/> | ||
); | ||
}; | ||
const ExtendedTextarea = extendVariants(TextArea, { | ||
variants: { | ||
radius: { | ||
xs: { | ||
inputWrapper: ['bg-content6', 'rounded', 'shadow-none'] | ||
} | ||
}, | ||
textSize: { | ||
base: { | ||
input: 'text-base' | ||
}, | ||
large: { | ||
input: 'text-2xl' | ||
} | ||
} | ||
} | ||
}); | ||
export { TextArea }; |