17 lines
671 B
TypeScript
17 lines
671 B
TypeScript
import type { FloatingButtonProps } from '../interfaces/floating-button'
|
|
|
|
function FloatingButton({ onClick, label = 'Créer une note' }: FloatingButtonProps) {
|
|
return (
|
|
<button
|
|
type="button"
|
|
onClick={onClick}
|
|
aria-label={label}
|
|
className="fixed bottom-[calc(env(safe-area-inset-bottom)+1.5rem)] right-6 z-20 flex h-14 w-14 items-center justify-center rounded-full bg-blue-700 text-3xl text-white shadow-lg transition-all hover:scale-110 hover:bg-blue-800 hover:shadow-xl hover:rotate-6 active:scale-95 focus:outline-none focus:ring-2 focus:ring-blue-800 focus:ring-offset-2"
|
|
>
|
|
+
|
|
</button>
|
|
)
|
|
}
|
|
|
|
export default FloatingButton
|