fix(repo): we start over, its really that time
Some checks failed
Build and Deploy / Build Images and Deploy to Server (push) Has been cancelled
Some checks failed
Build and Deploy / Build Images and Deploy to Server (push) Has been cancelled
This commit is contained in:
parent
8ed519b89a
commit
d6378b8eb1
73 changed files with 1 additions and 6205 deletions
19
frontend/src/components/ui/button/delete-button.jsx
Normal file
19
frontend/src/components/ui/button/delete-button.jsx
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { Flame } from "lucide-react";
|
||||
import { motion } from "motion/react";
|
||||
|
||||
export default function FlameButton({ onClick, disabled = false }) {
|
||||
return (
|
||||
<motion.button
|
||||
onClick={onClick}
|
||||
className={`bg-gray-700 p-2 rounded-2xl border-2 border-gray-600 ${
|
||||
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
||||
}`}
|
||||
whileHover={disabled ? undefined : { scale: 1.1 }}
|
||||
whileTap={disabled ? undefined : { scale: 0.9 }}
|
||||
disabled={disabled}
|
||||
style={{ opacity: disabled ? 0.5 : 1 }}
|
||||
>
|
||||
<Flame />
|
||||
</motion.button>
|
||||
);
|
||||
}
|
||||
24
frontend/src/components/ui/button/down-button.jsx
Normal file
24
frontend/src/components/ui/button/down-button.jsx
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import React from "react";
|
||||
import { ArrowDown } from "lucide-react";
|
||||
import { motion } from "motion/react";
|
||||
|
||||
export default function DownButton({ onClick }) {
|
||||
function handleClick(e) {
|
||||
if (onClick) return onClick(e);
|
||||
// default behavior: scroll to bottom of page smoothly
|
||||
const doc = document.documentElement;
|
||||
const top = Math.max(doc.scrollHeight, document.body.scrollHeight);
|
||||
window.scrollTo({ top, behavior: "smooth" });
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.button
|
||||
onClick={handleClick}
|
||||
className="bg-gray-700 p-2 rounded-2xl file-input border-2 border-gray-600"
|
||||
whileHover={{ scale: 1.1 }}
|
||||
whileTap={{ scale: 0.9 }}
|
||||
>
|
||||
<ArrowDown />
|
||||
</motion.button>
|
||||
);
|
||||
}
|
||||
33
frontend/src/components/ui/button/schematic-button.jsx
Normal file
33
frontend/src/components/ui/button/schematic-button.jsx
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import React, { forwardRef, useRef } from "react";
|
||||
import { motion } from "motion/react";
|
||||
|
||||
// Hidden file input that exposes an open() method via ref
|
||||
const SchematicButton = forwardRef(function SchematicButton({ onFiles }, ref) {
|
||||
const inputRef = useRef(null);
|
||||
|
||||
React.useImperativeHandle(ref, () => ({
|
||||
open: () => inputRef.current && inputRef.current.click(),
|
||||
}));
|
||||
|
||||
function handleFiles(e) {
|
||||
const files = Array.from(e.target.files || []);
|
||||
if (files.length === 0) return;
|
||||
if (onFiles) onFiles(files);
|
||||
if (inputRef.current) inputRef.current.value = null;
|
||||
}
|
||||
|
||||
return (
|
||||
<motion.input
|
||||
ref={inputRef}
|
||||
type="file"
|
||||
accept="image/*,application/pdf"
|
||||
multiple
|
||||
onChange={handleFiles}
|
||||
className="file-input hidden"
|
||||
whileHover={{ scale: 1.02 }}
|
||||
whileTap={{ scale: 0.98 }}
|
||||
/>
|
||||
);
|
||||
});
|
||||
|
||||
export default SchematicButton;
|
||||
Loading…
Add table
Add a link
Reference in a new issue