mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 05:22:02 +00:00
chore: update Button component
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import react, { JSX } from 'react';
|
||||
import react from 'react';
|
||||
|
||||
import Link from 'next/link';
|
||||
|
||||
@@ -17,11 +17,12 @@ const Button = ({
|
||||
type,
|
||||
href,
|
||||
variant,
|
||||
color,
|
||||
color = 'primary',
|
||||
isLoading,
|
||||
className,
|
||||
disabled,
|
||||
onClick,
|
||||
...props
|
||||
}: ButtonProps) => {
|
||||
const btnBaseClassName = cn(
|
||||
'btn',
|
||||
@@ -49,6 +50,7 @@ const Button = ({
|
||||
<>
|
||||
{!href && (
|
||||
<button
|
||||
{...props}
|
||||
type={type}
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
@@ -59,7 +61,7 @@ const Button = ({
|
||||
)}
|
||||
>
|
||||
{!isLoading && children}
|
||||
{isLoading && <span className='loading loading-dots loading-md' />}
|
||||
{isLoading && <span className='loading loading-dots loading-xl' />}
|
||||
</button>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user