mirror of
https://github.com/koreanbots/core.git
synced 2025-12-15 14:10:22 +00:00
chore: className update props
This commit is contained in:
parent
90254951f6
commit
1bf4e8fb52
@ -1,13 +1,13 @@
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
const Button = ({ type='button', className='', children, href, onClick }: ButtonProps):JSX.Element => {
|
const Button = ({ type='button', className, children, href, onClick }: ButtonProps):JSX.Element => {
|
||||||
return href ? <Link href={href}>
|
return href ? <Link href={href}>
|
||||||
<a className={`cursor-pointer bg-discord-blurple hover:opacity-80 dark:bg-very-black dark:hover:bg-discord-dark-hover text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none outline-none foucs:outline-none ${className}`}>
|
<a className={`cursor-pointer rounded-md px-4 py-2 m-2 transition duration-500 ease select-none outline-none foucs:outline-none ${className ?? 'bg-discord-blurple hover:opacity-80 dark:bg-very-black dark:hover:bg-discord-dark-hover text-white'}`}>
|
||||||
{ children }
|
{ children }
|
||||||
</a>
|
</a>
|
||||||
</Link> : onClick ? <button type={type} onKeyDown={onClick} onClick={onClick} className={`cursor-pointer bg-discord-blurple hover:opacity-80 dark:bg-very-black dark:hover:bg-discord-dark-hover text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none outline-none foucs:outline-none ${className}`}>
|
</Link> : onClick ? <button type={type} onKeyDown={onClick} onClick={onClick} className={`cursor-pointer rounded-md px-4 py-2 m-2 transition duration-500 ease select-none outline-none foucs:outline-none ${className ?? 'bg-discord-blurple hover:opacity-80 dark:bg-very-black dark:hover:bg-discord-dark-hover text-white'}`}>
|
||||||
{ children }
|
{ children }
|
||||||
</button> : <button type={type} className={`cursor-pointer bg-discord-blurple hover:opacity-80 dark:bg-very-black dark:hover:bg-discord-dark-hover text-white rounded-md px-4 py-2 m-2 transition duration-500 ease select-none outline-none foucs:outline-none ${className}`}>
|
</button> : <button type={type} className={`cursor-pointer rounded-md px-4 py-2 m-2 transition duration-500 ease select-none outline-none foucs:outline-none ${className ?? 'bg-discord-blurple hover:opacity-80 dark:bg-very-black dark:hover:bg-discord-dark-hover text-white'}`}>
|
||||||
{ children }
|
{ children }
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
@ -15,7 +15,7 @@ const Button = ({ type='button', className='', children, href, onClick }: Button
|
|||||||
interface ButtonProps {
|
interface ButtonProps {
|
||||||
type?: 'button' | 'submit' | 'reset'
|
type?: 'button' | 'submit' | 'reset'
|
||||||
className?: string
|
className?: string
|
||||||
children: JSX.Element | JSX.Element[] | string
|
children: JSX.Element | string
|
||||||
href?: string
|
href?: string
|
||||||
onClick?: () => void
|
onClick?: () => void
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user