Esteves Enzo commited on
Commit
9df11bd
·
1 Parent(s): 02b9873

add advanced settings

Browse files
components/input-generation.tsx CHANGED
@@ -1,6 +1,6 @@
1
  import classNames from "classnames";
2
- import { useRef, useState } from "react";
3
- import { HiLightBulb } from "react-icons/hi";
4
 
5
  interface Props {
6
  prompt: string;
@@ -36,7 +36,7 @@ export const InputGeneration: React.FC<Props> = ({
36
  <button
37
  disabled={!prompt}
38
  className={classNames(
39
- "bg-primary disabled:bg-gray-300 disabled:text-gray-500 uppercase text-white font-semibold rounded-full px-4 py-2 text-base transition-all duration-200",
40
  {
41
  "animate-pulse": loading,
42
  }
@@ -46,7 +46,10 @@ export const InputGeneration: React.FC<Props> = ({
46
  onSubmit();
47
  }}
48
  >
49
- {loading ? "Generating..." : "Generate"}
 
 
 
50
  </button>
51
  </div>
52
  );
 
1
  import classNames from "classnames";
2
+ import { useRef } from "react";
3
+ import { HiLightBulb, HiSearch } from "react-icons/hi";
4
 
5
  interface Props {
6
  prompt: string;
 
36
  <button
37
  disabled={!prompt}
38
  className={classNames(
39
+ "bg-primary disabled:bg-gray-300 disabled:text-gray-500 uppercase text-white font-semibold rounded-full px-2 lg:px-4 py-2 text-base transition-all duration-200",
40
  {
41
  "animate-pulse": loading,
42
  }
 
46
  onSubmit();
47
  }}
48
  >
49
+ <span className="hidden lg:block">
50
+ {loading ? "Generating..." : "Generate"}
51
+ </span>
52
+ <HiSearch className="w-5 h-5 lg:hidden" />
53
  </button>
54
  </div>
55
  );
components/main/index.tsx CHANGED
@@ -33,7 +33,7 @@ export const Main = () => {
33
  <main className="px-6 z-[2] relative max-w-[1722px] mx-auto">
34
  <div className="py-2 pl-2 pr-4 bg-black bg-opacity-30 backdrop-blur-sm sticky top-6 z-10 rounded-full">
35
  <div className="flex flex-col lg:flex-row items-center justify-between w-full">
36
- <div className="flex items-center justify-start gap-3 w-full">
37
  <InputGeneration
38
  prompt={prompt}
39
  onChange={setPrompt}
@@ -41,14 +41,14 @@ export const Main = () => {
41
  loading={loading}
42
  />
43
  <p
44
- className="text-white/70 font-medium text-sm flex items-center justify-start gap-2 hover:text-white cursor-pointer"
45
  onClick={() => setAdvancedSettings(!advancedSettings)}
46
  >
47
  <HiAdjustmentsHorizontal className="w-5 h-5" />
48
  Advanced settings
49
  </p>
50
  </div>
51
- <div className="flex items-center justify-center lg:justify-end gap-5 w-full mt-6 lg:mt-0">
52
  {categories.map(({ key, label, icon }) => (
53
  <Button
54
  key={key}
 
33
  <main className="px-6 z-[2] relative max-w-[1722px] mx-auto">
34
  <div className="py-2 pl-2 pr-4 bg-black bg-opacity-30 backdrop-blur-sm sticky top-6 z-10 rounded-full">
35
  <div className="flex flex-col lg:flex-row items-center justify-between w-full">
36
+ <div className="flex items-center justify-start gap-3 w-full flex-col lg:flex-row">
37
  <InputGeneration
38
  prompt={prompt}
39
  onChange={setPrompt}
 
41
  loading={loading}
42
  />
43
  <p
44
+ className="text-white/70 font-medium text-sm flex items-center justify-start gap-2 hover:text-white cursor-pointer mt-2 lg:mt-0"
45
  onClick={() => setAdvancedSettings(!advancedSettings)}
46
  >
47
  <HiAdjustmentsHorizontal className="w-5 h-5" />
48
  Advanced settings
49
  </p>
50
  </div>
51
+ <div className="items-center justify-center lg:justify-end gap-5 w-full mt-6 lg:mt-0 hidden lg:flex">
52
  {categories.map(({ key, label, icon }) => (
53
  <Button
54
  key={key}