2025-11-09 13:09:22 +01:00
|
|
|
import React from "react";
|
2025-10-13 20:22:47 +02:00
|
|
|
import classNames from "classnames";
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
children: React.ReactNode;
|
|
|
|
|
className?: string;
|
|
|
|
|
disabled?: boolean;
|
|
|
|
|
onClick?: () => void;
|
|
|
|
|
size?: "small" | "medium" | "large";
|
|
|
|
|
type: 'submit' | 'button';
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-09 13:09:22 +01:00
|
|
|
const OutlineButton = ({ children, className, disabled = false, onClick, size, type }: Props) => {
|
2025-10-13 20:22:47 +02:00
|
|
|
const style = classNames(
|
|
|
|
|
"justify-center border-2 border-accent font-size-18 text-accent-blue py-2 px-4 rounded flex",
|
|
|
|
|
{ 'text-xs': size === "small" },
|
|
|
|
|
className
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if (onClick === undefined) {
|
|
|
|
|
onClick = () => {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<button
|
|
|
|
|
type={ type }
|
|
|
|
|
className={ style }
|
|
|
|
|
disabled={ disabled }
|
|
|
|
|
onClick={ onClick }
|
|
|
|
|
>
|
|
|
|
|
{ children }
|
|
|
|
|
</button>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default OutlineButton
|