From 12171e12dcb9bf92a3f4ab7792e9f15ab9329b12 Mon Sep 17 00:00:00 2001 From: Martin Bohal Date: Wed, 10 Jan 2024 11:15:15 +0100 Subject: [PATCH] Omit link to legacy list of React synthetic events in component documentation --- mkdocs.yml | 1 + src/components/Alert/README.md | 16 +++++++------ src/components/Badge/README.md | 16 +++++++------ src/components/Button/README.md | 16 +++++++------ src/components/ButtonGroup/README.md | 18 +++++++------- src/components/Card/README.md | 16 +++++++------ src/components/CheckboxField/README.md | 18 +++++++------- src/components/FileInputField/README.md | 18 +++++++------- src/components/FormLayout/README.md | 20 +++++++++------- src/components/Grid/README.md | 19 ++++++++------- src/components/InputGroup/README.md | 18 +++++++------- src/components/Modal/README.md | 31 ++++++++++++++----------- src/components/Paper/README.md | 16 +++++++------ src/components/Popover/README.md | 16 +++++++------ src/components/Radio/README.md | 22 ++++++++++-------- src/components/ScrollView/README.md | 18 +++++++------- src/components/SelectField/README.md | 18 +++++++------- src/components/Table/README.md | 18 +++++++------- src/components/Tabs/README.md | 26 +++++++++++++-------- src/components/Text/README.md | 24 ++++++++++++------- src/components/TextArea/README.md | 18 +++++++------- src/components/TextField/README.md | 21 ++++++++++------- src/components/TextLink/README.md | 18 +++++++------- src/components/Toggle/README.md | 18 +++++++------- src/components/Toolbar/README.md | 16 +++++++------ 25 files changed, 259 insertions(+), 197 deletions(-) diff --git a/mkdocs.yml b/mkdocs.yml index 32d14358..5387bfc0 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,6 +11,7 @@ docs_dir: 'src' markdown_extensions: - admonition + - attr_list - def_list - pymdownx.highlight: use_pygments: false diff --git a/src/components/Alert/README.md b/src/components/Alert/README.md index 0009db04..34d696f5 100644 --- a/src/components/Alert/README.md +++ b/src/components/Alert/README.md @@ -171,13 +171,15 @@ React.createElement(() => { ## Forwarding HTML Attributes In addition to the options below in the [component's API](#api) section, you -can specify [React synthetic events] or **any HTML attribute you like.** All -attributes that don't interfere with the API are forwarded to the root `
` -HTML element. This enables making the component interactive and helps to improve +can specify **any HTML attribute you like.** All attributes that don't interfere +with the API of the React component are forwarded to the root `
` HTML +element. This enables making the component interactive and helps to improve its accessibility. -👉 Refer to the MDN reference for the full list of supported attributes of the -[div] element. +👉 For the full list of supported attributes refer to: + +- [`
` HTML element attributes][div-attributes]{:target="_blank"} +- [React common props]{:target="_blank"} ## API @@ -211,5 +213,5 @@ Where: - `` is one of `color` (color of text), `foreground-color` (color of border, icon, links, and emphasis), or `background-color`. -[React synthetic events]: https://reactjs.org/docs/events.html -[div]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes +[div-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes +[React common props]: https://react.dev/reference/react-dom/components/common#common-props diff --git a/src/components/Badge/README.md b/src/components/Badge/README.md index a7ef811d..1598f285 100644 --- a/src/components/Badge/README.md +++ b/src/components/Badge/README.md @@ -87,17 +87,19 @@ Medium-emphasis priority to provide additional context in an unobtrusive way. ## Forwarding HTML Attributes In addition to the options below in the [component's API](#api) section, you -can specify [React synthetic events] or **any HTML attribute you like.** All -attributes that don't interfere with the API are forwarded to the root `
` -HTML element. This enables making the component interactive and helps to improve +can specify **any HTML attribute you like.** All attributes that don't interfere +with the API of the React component are forwarded to the root `
` HTML +element. This enables making the component interactive and helps to improve its accessibility. -👉 Refer to the MDN reference for the full list of supported attributes of the -[div] element. +👉 For the full list of supported attributes refer to: + +- [`
` HTML element attributes][div-attributes]{:target="_blank"} +- [React common props]{:target="_blank"} ## API -[React synthetic events]: https://reactjs.org/docs/events.html -[div]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes +[div-attributes]: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/div#attributes +[React common props]: https://react.dev/reference/react-dom/components/common#common-props diff --git a/src/components/Button/README.md b/src/components/Button/README.md index 778e02e2..800d93b7 100644 --- a/src/components/Button/README.md +++ b/src/components/Button/README.md @@ -388,13 +388,15 @@ animation is made. ## Forwarding HTML Attributes In addition to the options below in the [component's API](#api) section, you -can specify [React synthetic events] or **any HTML attribute you like.** All -attributes that don't interfere with the API are forwarded to the native HTML -`