Files
NapCatQQ/.pnpm-store/v3/files/20/e525298de4d0c57841550216e07cc0b2531b513ecec8db1cd699c85c935635e5e6fc7158d868fd39ff0e46d2669848140a4ed42ac32713b0e07f12dd8cffb7
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

18 lines
904 B
Plaintext

/**
* Returns an appropriate value for the `inert` attribute based on the React version.
*
* In React 19, the attribute `inert` is a boolean. In versions prior to 19, the attribute
* behaves differently: setting `inert=""` will make it `true`, and `inert=undefined` will make it `false`.
*
* @param {boolean} v - The desired boolean state for the `inert` attribute.
* @returns {boolean | string | undefined} - Depending on the React version:
* - Returns `boolean` if React version is 19 (the input value `v` directly).
* - Returns `string` (empty string) if `v` is `true` in older React versions.
* - Returns `undefined` if `v` is `false` in older React versions.
*
* @see {@link https://github.com/facebook/react/issues/17157} for more details on the behavior in older React versions.
*/
declare const getInertValue: (v: boolean) => boolean | string | undefined;
export { getInertValue };