komponensek frissitese

This commit is contained in:
2025-05-22 03:54:28 +02:00
parent c4b86143bf
commit 48c29d81d0
5 changed files with 38 additions and 19 deletions
@@ -3,14 +3,16 @@
import { motion } from "framer-motion";
export default function Button({ text, type, onClick }) {
export default function Button({ text, type, onClick, width }) {
const widthClass = width ? width : "w-full";
return (
<motion.button
whileHover={{ scale: 1.05 }}
whileTap={{ scale: 0.95 }}
type={type}
onClick={onClick}
className="w-full bg-button-primary text-white py-3 rounded-lg hover:bg-button-hover transition shadow-md font-semibold text-lg"
className={`${widthClass} bg-button-primary text-white py-3 rounded-lg hover:bg-button-hover transition shadow-md font-semibold text-lg`}
>
{text}
</motion.button>
@@ -1,16 +1,16 @@
// src/components/Inputs/InputBox.jsx
// InputBox komponens
export default function InputBox({ type, placeholder, value, onChange }) {
return (
<div className="mb-6 relative">
<input
type={type}
className="w-full px-4 py-3 border border-gray-300 rounded-lg focus:border-background focus:outline-none text-gray-700 placeholder-gray-400 bg-gray-50"
placeholder={placeholder}
value={value}
onChange={onChange}
/>
</div>
);
}
export default function InputBox({ type, placeholder, value, onChange, width }) {
const widthClass = width ? width : "w-full";
return (
<input
type={type}
className={`${widthClass} px-4 py-3 border border-gray-300 rounded-lg focus:border-background focus:outline-none text-gray-700 placeholder-gray-400 bg-gray-50`}
placeholder={placeholder}
value={value}
onChange={onChange}
/>
);
}