Skip to content

Commit 4e65f6c

Browse files
committed
docs: clarify modal is the default mode (mode prop optional, not required)
1 parent 84e1cef commit 4e65f6c

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

react/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,27 +73,27 @@ _Example_
7373
```jsx
7474
import { EmbedPDF } from '@simplepdf/react-embed-pdf';
7575

76-
<EmbedPDF mode="modal" companyIdentifier="yourcompany">
76+
<EmbedPDF companyIdentifier="yourcompany">
7777
<a href="https://cdn.simplepdf.com/simple-pdf/assets/sample.pdf">Opens sample.pdf</a>
7878
</EmbedPDF>;
7979
```
8080

8181
### Modal mode
8282

83-
Pass `mode="modal"` and wrap any HTML element to open a modal with the editor on user click.
83+
Modal is the default — just wrap any HTML element and the editor opens in a modal on the user's click. You don't need the `mode` prop; pass `mode="modal"` only if you want to be explicit.
8484

8585
```jsx
8686
import { EmbedPDF } from "@simplepdf/react-embed-pdf";
8787

8888
// Opens the PDF on click
89-
<EmbedPDF mode="modal">
89+
<EmbedPDF>
9090
<a href="https://cdn.simplepdf.com/simple-pdf/assets/sample.pdf">
9191
Opens sample.pdf
9292
</a>
9393
</EmbedPDF>
9494

9595
// Let the user pick the PDF
96-
<EmbedPDF mode="modal">
96+
<EmbedPDF>
9797
<button>Opens the simplePDF editor</button>
9898
</EmbedPDF>
9999
```

0 commit comments

Comments
 (0)