Skip to content

Commit

Permalink
Merge pull request #30 from uploadcare/fix/add-import-style-in-readme
Browse files Browse the repository at this point in the history
fix(react-uploader): added import style in the Readme.md
  • Loading branch information
egordidenko authored May 29, 2024
2 parents 1edddd9 + 0c93ed3 commit 535958a
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions packages/react-uploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,23 +58,26 @@ Each component serves specific use cases and can be easily implemented into your
### Regular

```jsx
import {FileUploaderRegular} from "@uploadcare/react-uploader";
import { FileUploaderRegular } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";

<FileUploaderRegular pubkey="YOUR_PUBLIC_KEY"/>;
```

### Inline

```jsx
import {FileUploaderInline} from "@uploadcare/react-uploader";
import { FileUploaderInline } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";

<FileUploaderInline pubkey="YOUR_PUBLIC_KEY"/>;
```

### Minimal

```jsx
import {FileUploaderMinimal} from "@uploadcare/react-uploader";
import { FileUploaderMinimal } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";

<FileUploaderMinimal pubkey="YOUR_PUBLIC_KEY"/>;
```
Expand All @@ -91,7 +94,8 @@ You can customize the appearance of the React uploader using the className prop,
classes to the uploader `FileUploader[Regular | Minimal | Inline]` wrapper.

```jsx
import {FileUploaderRegular} from "@uploadcare/react-uploader";
import { FileUploaderRegular } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";

<FileUploaderRegular className="fileUploaderWrapper" pubkey="YOUR_PUBLIC_KEY"/>;
```
Expand All @@ -113,6 +117,7 @@ import {
FileUploaderRegular,
UploadCtxProvider
} from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";

const Example = () => {
const uploaderRef = useRef < InstanceType < UploadCtxProvider > | null > (null);
Expand All @@ -133,7 +138,8 @@ The principle of converting events from blocks to React Uploader:
Example:

```jsx
import {FileUploaderRegular} from "@uploadcare/react-uploader";
import { FileUploaderRegular } from "@uploadcare/react-uploader";
import "@uploadcare/react-adapter/core.css";

<FileUploaderRegular
pubkey="YOUR_PUBLIC_KEY"
Expand Down

0 comments on commit 535958a

Please sign in to comment.