flowbite-react icon indicating copy to clipboard operation
flowbite-react copied to clipboard

Flowbite button does not have attribute download

Open Hann1bal opened this issue 1 year ago • 0 comments

  • [x] I have searched the Issues to see if this bug has already been reported
  • [x] I have tested the latest version

Steps to reproduce

Current behavior

<Button href={'data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(tasss))}'} color="gray" className="w-full mb-2" download={"filename.json"}>
 Download Json
 </Button>

I write button for downloading buffered data and it's working but i can't compile. I got the error:

Type '{ children: string; href: string; color: string; className: string; download: string; }' is not assignable to type 'IntrinsicAttributes & { href?: string; color?: keyof FlowbiteColors; fullSized?: boolean; gradientDuoTone?: keyof ButtonGradientDuoToneColors; ... 10 more ...; theme?: { ...; }; } & AsProp<...> & { ...; } & Omit<...> & { ...; }'.
  Property 'download' does not exist on type 'IntrinsicAttributes & { href?: string; color?: keyof FlowbiteColors; fullSized?: boolean; gradientDuoTone?: keyof ButtonGradientDuoToneColors; ... 10 more ...; theme?: { ...; }; } & AsProp<...> & { ...; } & Omit<...> & { ...; }'. Did you mean 'onLoad'?ts(2322)

Expected behavior

In default html button exist "download" attribute .

Hann1bal avatar May 05 '24 19:05 Hann1bal