feat: redesign buttons and share them in dialogs

This commit is contained in:
Aarnav Tale
2025-01-19 17:31:46 +00:00
parent b9a708b2e9
commit af248df648
10 changed files with 104 additions and 87 deletions
+5 -6
View File
@@ -1,16 +1,15 @@
import type { Dispatch, SetStateAction } from 'react';
import React, { useRef } from 'react';
import { Button as AriaButton } from 'react-aria-components';
import { useButton } from 'react-aria';
import { useButton, type AriaButtonOptions } from 'react-aria';
import { cn } from '~/utils/cn';
export interface ButtonProps extends React.HTMLProps<HTMLButtonElement> {
variant?: 'heavy'
isDisabled?: boolean
export interface ButtonProps extends AriaButtonOptions<'button'> {
variant?: 'heavy' | 'light'
className?: string
children?: React.ReactNode
}
export default function Button({ variant = 'light', ...props }: Props) {
export default function Button({ variant = 'light', ...props }: ButtonProps) {
const ref = useRef<HTMLButtonElement | null>(null);
const { buttonProps } = useButton(props, ref);