diff --git a/src/bootstrap/Checkbox.md b/src/bootstrap/Checkbox.md index ccf1c43..49e82f0 100644 --- a/src/bootstrap/Checkbox.md +++ b/src/bootstrap/Checkbox.md @@ -4,7 +4,7 @@ using in foris forms. All additional `props` are passed to the `` HTML component. -```js +```jsx import { useState } from "react"; const [value, setValue] = useState(false); diff --git a/src/bootstrap/CopyInput.md b/src/bootstrap/CopyInput.md index dcd6b4c..b778664 100644 --- a/src/bootstrap/CopyInput.md +++ b/src/bootstrap/CopyInput.md @@ -4,7 +4,7 @@ be used with `readOnly` and `disabled` parameters, please see an example. All additional `props` are passed to the `` HTML component. -```js +```jsx import React, { useState } from "react"; const [value, setValue] = useState("Text to appear in clipboard."); diff --git a/src/bootstrap/DataTimeInput.md b/src/bootstrap/DataTimeInput.md index 4dfc33f..fb4af69 100644 --- a/src/bootstrap/DataTimeInput.md +++ b/src/bootstrap/DataTimeInput.md @@ -4,7 +4,7 @@ Adopted from `react-datetime/DateTime` datatime picker component. It uses It requires `ForisTranslations.locale` to be defined in order to use right locale. -```js +```jsx ForisTranslations = { locale: "en" }; import { useState, useEffect } from "react"; diff --git a/src/bootstrap/DownloadButton.md b/src/bootstrap/DownloadButton.md index e70e3d6..30066f5 100644 --- a/src/bootstrap/DownloadButton.md +++ b/src/bootstrap/DownloadButton.md @@ -5,6 +5,6 @@ Firefox. See [related issue](https://bugzilla.mozilla.org/show_bug.cgi?id=858538) for more details. -```js +```jsx Download ``` diff --git a/src/bootstrap/EmailInput.md b/src/bootstrap/EmailInput.md index 1178756..fcb22ae 100644 --- a/src/bootstrap/EmailInput.md +++ b/src/bootstrap/EmailInput.md @@ -4,10 +4,12 @@ checking. It's only meaningful using inside `
`. All additional `props` are passed to the `` HTML component. -```js +```jsx import { useState } from "react"; import Button from "./Button"; + const [email, setEmail] = useState("Wrong email"); + e.preventDefault()}> ` HTML component. -```js +```jsx import { useState } from "react"; const [files, setFiles] = useState([]); @@ -23,7 +23,7 @@ const label = files.length === 1 ? files[0].name : "Choose file"; ### FileInput with multiple files -```js +```jsx import { useState } from "react"; const [files, setFiles] = useState([]); diff --git a/src/bootstrap/Modal.md b/src/bootstrap/Modal.md index 08d4878..7e70b6d 100644 --- a/src/bootstrap/Modal.md +++ b/src/bootstrap/Modal.md @@ -6,9 +6,9 @@ the page since modals are rendered in portals. Modals also have three optional sizes, which can be defined through the `size` prop: -- small - `sm` -- large - `lg` -- extra-large - `xl` +- small - `sm` +- large - `lg` +- extra-large - `xl` For more details please visit Bootstrap @@ -18,7 +18,7 @@ documentation.