Files
Brandon Thomas b31badc6d1 Editor3D - this directory is a fork of "studio gen 2" by Tanish.
We'll be using this for our image generation roadmap:

https://docs.google.com/document/d/1O9YI_iLwXkl2wAJJ23dFp3eHR-JzhlRHCBPD8psG-1E/edit

The original Studio Gen 2 is in the `frontend/studio-gen-2` directory.

The original Studio Gen 1 is in the `frontend/studio-gen-1` directory
2025-03-31 13:28:59 -04:00

40 lines
879 B
TypeScript

import { IconDefinition } from "@fortawesome/fontawesome-svg-core";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { twMerge } from "tailwind-merge";
interface ButtonIconStackProps {
icon: IconDefinition;
text: string;
onClick?: () => void;
style?: string;
additionalStyle?: string;
}
export function ButtonIconStack({
icon,
text = "",
onClick,
style,
additionalStyle,
}: ButtonIconStackProps) {
const defaultStyle = twMerge(
"flex flex-col items-center justify-center text-xs transition-all duration-150",
"h-full w-full gap-1 p-2",
additionalStyle
)
return (
<button
className={style ?? defaultStyle}
onClick={onClick}
>
<FontAwesomeIcon icon={icon} size="xl" />
{text && (
<span className="text-nowrap text-xs font-medium">{text}</span>
)}
</button>
);
}