mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-20 23:33:45 +02:00
Add database password rotation to view
This commit is contained in:
20
resources/scripts/components/elements/Button.tsx
Normal file
20
resources/scripts/components/elements/Button.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
|
||||
type Props = { isLoading?: boolean } & React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
|
||||
|
||||
export default ({ isLoading, children, className, ...props }: Props) => (
|
||||
<button
|
||||
{...props}
|
||||
className={classNames('btn btn-sm relative', className)}
|
||||
>
|
||||
{isLoading &&
|
||||
<div className={'w-full flex absolute justify-center'} style={{ marginLeft: '-0.75rem' }}>
|
||||
<div className={'spinner-circle spinner-white spinner-sm'}/>
|
||||
</div>
|
||||
}
|
||||
<span className={isLoading ? 'text-transparent' : undefined}>
|
||||
{children}
|
||||
</span>
|
||||
</button>
|
||||
);
|
||||
Reference in New Issue
Block a user