Files
HRM-System/node_modules/@react-aria/utils/src/inertValue.ts
2026-04-13 09:30:59 +08:00

12 lines
303 B
TypeScript

import {version} from 'react';
export function inertValue(value?: boolean): string | boolean | undefined {
const pieces = version.split('.');
const major = parseInt(pieces[0], 10);
if (major >= 19) {
return value;
}
// compatibility with React < 19
return value ? 'true' : undefined;
}