This commit is contained in:
2025-12-24 01:58:52 -03:00
parent 2459bafc5d
commit 038a737802
2 changed files with 29 additions and 16 deletions

View File

@@ -1,4 +1,4 @@
import type { InputHTMLAttributes } from 'react'
import type { ButtonHTMLAttributes } from 'react'
import { useRequest, useToggle } from 'ahooks'
import { useForm } from 'react-hook-form'
import { zodResolver } from '@hookform/resolvers/zod'
@@ -28,10 +28,11 @@ export const formSchema = z.object({
export type Schema = z.infer<typeof formSchema>
interface DiscountProps extends Omit<
InputHTMLAttributes<HTMLInputElement>,
'value' | 'onChange'
ButtonHTMLAttributes<HTMLButtonElement>,
'onChange'
> {
onChange?: (value: any) => void
disabled?: boolean
}
export function Discount({ onChange, ...props }: DiscountProps) {