diff --git a/mkdocs.yml b/mkdocs.yml index 5387bfc0..f6b49de7 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -131,6 +131,7 @@ nav: - Typography: 'docs/css-helpers/typography.md' - JS Helpers: - Classnames: 'docs/js-helpers/classnames.md' + - Transferring Props: 'docs/js-helpers/transferProps.md' - Guides: - Customize: - Theming: diff --git a/src/components/Alert/Alert.jsx b/src/components/Alert/Alert.jsx index 33a7b2bd..d07852e2 100644 --- a/src/components/Alert/Alert.jsx +++ b/src/components/Alert/Alert.jsx @@ -4,8 +4,8 @@ import { RUIContext, withGlobalProps, } from '../../provider'; -import { transferProps } from '../_helpers/transferProps'; import { classNames } from '../../utils/classNames'; +import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; import styles from './Alert.module.scss'; diff --git a/src/components/Alert/README.md b/src/components/Alert/README.md index 34d696f5..5abf8452 100644 --- a/src/components/Alert/README.md +++ b/src/components/Alert/README.md @@ -171,10 +171,11 @@ React.createElement(() => { ## Forwarding HTML Attributes In addition to the options below in the [component's API](#api) section, you -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. +can specify **any HTML attribute you like.** All attributes that don't +interfere with the API of the React component and that aren't filtered out by +[`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the +root `
` HTML element. This enables making the component interactive and +helps to improve its accessibility. 👉 For the full list of supported attributes refer to: diff --git a/src/components/Badge/Badge.jsx b/src/components/Badge/Badge.jsx index 53869644..56215029 100644 --- a/src/components/Badge/Badge.jsx +++ b/src/components/Badge/Badge.jsx @@ -1,8 +1,8 @@ import PropTypes from 'prop-types'; import React from 'react'; import { withGlobalProps } from '../../provider'; -import { transferProps } from '../_helpers/transferProps'; import { classNames } from '../../utils/classNames'; +import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; import styles from './Badge.module.scss'; diff --git a/src/components/Badge/README.md b/src/components/Badge/README.md index 1598f285..84f343d2 100644 --- a/src/components/Badge/README.md +++ b/src/components/Badge/README.md @@ -87,10 +87,11 @@ 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 **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. +can specify **any HTML attribute you like.** All attributes that don't +interfere with the API of the React component and that aren't filtered out by +[`transferProps`](/docs/js-helpers/transferProps) helper are forwarded to the +root `
` HTML element. This enables making the component interactive and +helps to improve its accessibility. 👉 For the full list of supported attributes refer to: diff --git a/src/components/Button/Button.jsx b/src/components/Button/Button.jsx index b93d455c..cf948894 100644 --- a/src/components/Button/Button.jsx +++ b/src/components/Button/Button.jsx @@ -2,10 +2,10 @@ import PropTypes from 'prop-types'; import React, { useContext } from 'react'; import { withGlobalProps } from '../../provider'; import { classNames } from '../../utils/classNames'; +import { transferProps } from '../../utils/transferProps'; import { getRootColorClassName } from '../_helpers/getRootColorClassName'; import { getRootSizeClassName } from '../_helpers/getRootSizeClassName'; import { resolveContextOrProp } from '../_helpers/resolveContextOrProp'; -import { transferProps } from '../_helpers/transferProps'; import { ButtonGroupContext } from '../ButtonGroup'; import { InputGroupContext } from '../InputGroup/InputGroupContext'; import getRootPriorityClassName from '../_helpers/getRootPriorityClassName'; diff --git a/src/components/Button/README.md b/src/components/Button/README.md index c7c77238..7e43d509 100644 --- a/src/components/Button/README.md +++ b/src/components/Button/README.md @@ -389,10 +389,11 @@ animation is made. ## Forwarding HTML Attributes In addition to the options below in the [component's API](#api) section, you -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 `