Skip to content

Commit

Permalink
fix(docs): fix dropzone docs and make it more cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
ruru-m07 committed Sep 24, 2024
1 parent 0eb0cb7 commit a99f540
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions apps/www/content/docs/components/dropzone.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,9 @@ This component is a **wrapper** around the [react-dropzone](https://github.com/r

<Tabs items={["Preview", "Code"]}>
<Tab className={"flex justify-center"} value="Preview" >
<Dropzone className="m-10" />
<div className="p-4 w-full">
<Dropzone />
</div>
</Tab>
<Tab className={"-mt-8"} value="Code">
```tsx
Expand All @@ -73,7 +75,9 @@ In this example, we learn how to handle files using the Dropzone component.

<Tabs items={["Preview", "Code"]}>
<Tab className={"flex justify-center"} value="Preview" >
<AdvanceDropzone className="m-10" />
<div className="p-4 w-full">
<AdvanceDropzone className="m-10" />
</div>
</Tab>
<Tab className={"-mt-8"} value="Code">
```tsx
Expand Down Expand Up @@ -132,6 +136,17 @@ export default AdvanceDropzone;
</Tab>
</Tabs>

## Import

We are exporting the `RD` component from the `react-dropzone` module.
Here RD is the alias for the `react-dropzone` library.

```tsx title="dropzone.tsx"
// [!code word:RD]
import * as RD from "react-dropzone";
export { RD };
```

## Props

| Name | Type | Default | Description |
Expand Down

0 comments on commit a99f540

Please sign in to comment.