styling fixes

This commit is contained in:
bflatastic committed 2024-04-19 09:16:08 +07:00
1 parent 9238425437
commit b050df0d3b
6 files changed
+56 -30

No files matched your search

+6 -3
View File
@@ -3,8 +3,11 @@ import { IconDefinition } from "@fortawesome/pro-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Label } from "./Typography";
import { kebabCase } from "~/utilities";
import { disableHotkeyInput,enableHotkeyInput,DomLevels } from "~/pages/PageEnigma/store";
import {
disableHotkeyInput,
enableHotkeyInput,
DomLevels,
} from "~/pages/PageEnigma/store";
interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
label?: string;
@@ -13,7 +16,7 @@ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {
export function Input({ label, icon, className, id, ...rest }: InputProps) {
return (
<div className={twMerge("flex flex-col gap-2", className)}>
<div className={twMerge("flex flex-col", className)}>
{label && <Label htmlFor={id ? id : kebabCase(label)}>{label}</Label>}
<div className="relative w-full">
+27 -13
View File
@@ -9,41 +9,54 @@ interface TypoProps {
const baseTypo = "text-white";
export const H1 = ({ className, children }: TypoProps) => (
<h1 className={twMerge(baseTypo, "text-2xl font-medium", className)}>{children}</h1>
<h1 className={twMerge(baseTypo, "text-2xl font-medium", className)}>
{children}
</h1>
);
export const H2 = ({ className, children }: TypoProps) => (
<h2 className={twMerge(baseTypo, "text-xl font-medium", className)}>{children}</h2>
<h2 className={twMerge(baseTypo, "text-xl font-medium", className)}>
{children}
</h2>
);
export const H3 = ({ className, children }: TypoProps) => (
<h3 className={twMerge(baseTypo, "text-lg font-medium", className)}>{children}</h3>
<h3 className={twMerge(baseTypo, "text-lg font-medium", className)}>
{children}
</h3>
);
export const H4 = ({ className, children }: TypoProps) => (
<h4 className={twMerge(baseTypo, "text-base font-medium", className)}>{children}</h4>
<h4 className={twMerge(baseTypo, "text-base font-medium", className)}>
{children}
</h4>
);
export const Label = ({
className, children, ...rest
export const Label = ({
className,
children,
...rest
}: LabelHTMLAttributes<HTMLLabelElement>) => (
<label
className={twMerge(baseTypo, "mb-2 text-base font-medium", className)}
{...rest}
>
{children}
className={twMerge(baseTypo, "mb-2 text-sm font-medium", className)}
{...rest}>
{children}
</label>
);
export const H5 = ({ className, children }: TypoProps) => (
<h5 className={twMerge(baseTypo, "text-sm font-medium", className)}>{children}</h5>
<h5 className={twMerge(baseTypo, "text-sm font-medium", className)}>
{children}
</h5>
);
export const H6 = ({ className, children }: TypoProps) => (
<h6 className={twMerge(baseTypo, "text-sm font-light", className)}>{children}</h6>
<h6 className={twMerge(baseTypo, "text-sm font-light", className)}>
{children}
</h6>
);
export const Link = ({className, ...rest}:NavLinkProps)=>
export const Link = ({ className, ...rest }: NavLinkProps) => (
<NavLink
className={twMerge(
"text-brand-primary hover:text-brand-primary-400",
@@ -51,6 +64,7 @@ export const Link = ({className, ...rest}:NavLinkProps)=>
)}
{...rest}
/>
);
export const P = ({ className, children }: TypoProps) => (
<p className={twMerge(baseTypo, className)}> {children} </p>
@@ -19,7 +19,7 @@ export function TabTitle({ title, onBack }: Props) {
};
return (
<div className="flex items-center justify-between pb-2">
<div className="flex items-center justify-between pb-3">
{onBack ? (
<div className="flex items-center gap-2">
<ButtonIcon onClick={onBack} icon={faAngleLeft} />
@@ -28,7 +28,12 @@ export function TabTitle({ title, onBack }: Props) {
) : (
<div className="align-middle text-base font-bold">{title}</div>
)}
<ButtonIcon onClick={onClose} icon={faClose} />
<ButtonIcon
onClick={onClose}
icon={faClose}
size="lg"
className="h-auto w-auto opacity-75 hover:opacity-50"
/>
</div>
);
}
@@ -43,11 +43,11 @@ export const Prompts = () => {
};
return (
<div className="flex flex-col gap-4 rounded-t-lg bg-ui-panel py-4">
<div className="flex flex-col gap-3 rounded-t-lg bg-ui-panel py-4">
<div className="relative w-full">
<Textarea
label="Enter a Prompt"
className="mb-4 w-full"
className="w-full"
rows={3}
name="positive-prompt"
placeholder="Type here to describe your scene"
@@ -56,11 +56,12 @@ export const Prompts = () => {
required
value={textBufferPositive}
/>
<div className="absolute right-0 top-0">
<div className="absolute right-0 top-[2px]">
<button
className="text-xs text-[#FC6B68]"
className="flex items-center text-xs font-medium text-[#FC6B68] transition-colors duration-100 hover:text-[#FC6B68]/85 "
onClick={generateRandomTextPositive}>
<FontAwesomeIcon icon={faRandom} /> Randomize
<FontAwesomeIcon icon={faRandom} className="me-2" />
Randomize
</button>
</div>
</div>
@@ -75,11 +76,12 @@ export const Prompts = () => {
resize="none"
value={textBufferNegative}
/>
<div className="absolute right-0 top-0">
<div className="absolute right-0 top-[2px]">
<button
className="text-xs text-[#FC6B68]"
className="flex items-center text-xs font-medium text-[#FC6B68] transition-colors duration-100 hover:text-[#FC6B68]/85"
onClick={generateRandomTextNegative}>
<FontAwesomeIcon icon={faRandom} /> Randomize
<FontAwesomeIcon icon={faRandom} className="me-2" />
Randomize
</button>
</div>
</div>
@@ -18,7 +18,9 @@ export function StyleButtons() {
return (
<div className="flex w-full flex-col justify-center gap-4 rounded-b-lg bg-ui-panel">
<div className="w-full">
<div className="text-sm">Render the current camera view with AI</div>
<div className="mb-2 text-sm font-medium">
Render the current camera view with AI
</div>
<Button
icon={faArrowsRotate}
variant="primary"
@@ -28,10 +30,10 @@ export function StyleButtons() {
</Button>
</div>
<div className="w-full">
<div className="text-sm">
<div className="text-sm font-medium">
When you&apos;re done, render your entire animation with AI
</div>
<div className="text-xs text-white/80">
<div className="mb-2 text-xs text-white/70">
(This may take several minutes)
</div>
<Button
@@ -10,7 +10,7 @@ export function StylizeTab() {
return (
<div
className="overflow-y-auto p-4"
className="overflow-y-auto overflow-x-hidden p-4"
style={{ height: sidePanelHeight.value }}>
<TabTitle title="Transform your animation with AI" />
<StyleSelection />