mirror of
https://github.com/aljazceru/AgentGPT.git
synced 2025-12-18 06:24:20 +01:00
🚀 Use Button
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import type { ForwardedRef } from "react";
|
import type { ForwardedRef } from "react";
|
||||||
import { forwardRef, useState } from "react";
|
import React, { forwardRef, useState } from "react";
|
||||||
|
|
||||||
import Loader from "./loader";
|
import Loader from "./loader";
|
||||||
|
|
||||||
@@ -31,11 +31,11 @@ const Button = forwardRef(
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
type={props.type}
|
type={props.type}
|
||||||
disabled={loading || props.disabled}
|
disabled={loading || props.disabled}
|
||||||
onClick={onClick}
|
|
||||||
className={
|
className={
|
||||||
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
// eslint-disable-next-line @typescript-eslint/restrict-plus-operands
|
||||||
"text-white transition hover:text-yellow-500 " + props.className
|
"transition-all " + props.className
|
||||||
}
|
}
|
||||||
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{loading ? (
|
{loading ? (
|
||||||
@@ -6,6 +6,7 @@ import ChatWindow from "../components/ChatWindow";
|
|||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
import Drawer from "../components/Drawer";
|
import Drawer from "../components/Drawer";
|
||||||
import Input from "../components/Input";
|
import Input from "../components/Input";
|
||||||
|
import Button from "../components/Button";
|
||||||
|
|
||||||
const Home: NextPage = () => {
|
const Home: NextPage = () => {
|
||||||
const [loading, setLoading] = React.useState<boolean>(false);
|
const [loading, setLoading] = React.useState<boolean>(false);
|
||||||
@@ -55,12 +56,12 @@ const Home: NextPage = () => {
|
|||||||
onChange={(e) => setGoalInput(e.target.value)}
|
onChange={(e) => setGoalInput(e.target.value)}
|
||||||
/>
|
/>
|
||||||
{/* eslint-disable-next-line @typescript-eslint/no-misused-promises */}
|
{/* eslint-disable-next-line @typescript-eslint/no-misused-promises */}
|
||||||
<button
|
<Button
|
||||||
onClick={() => void handleNewGoal()}
|
onClick={() => void handleNewGoal()}
|
||||||
className="w-64 rounded-full bg-gray-300"
|
className="font-bolder text-gray/50 rounded-lg bg-[#1E88E5]/70 px-10 py-5 font-bold text-black/60 hover:bg-[#0084f7] hover:text-white"
|
||||||
>
|
>
|
||||||
Deploy Agent
|
Deploy Agent
|
||||||
</button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</DefaultLayout>
|
</DefaultLayout>
|
||||||
|
|||||||
Reference in New Issue
Block a user