diff --git a/components/LongButton.tsx b/components/LongButton.tsx new file mode 100644 index 0000000..216f0af --- /dev/null +++ b/components/LongButton.tsx @@ -0,0 +1,28 @@ +/* eslint-disable jsx-a11y/no-static-element-interactions */ +import Link from 'next/link' + +const LongButton = ({ children, href, onClick }:LongButtonProps):JSX.Element => { + if(href) return +
+ {children} +
+ + if(onClick) return
+ {children} +
+ + return
+ {children} +
+ + + +} + +export default LongButton + +interface LongButtonProps { + onClick?: (event: React.KeyboardEvent|React.MouseEvent) => void + children: JSX.Element | JSX.Element[] + href?: string +} \ No newline at end of file