ant-design/components/_util/hooks/useFlexGapSupport.ts
二货机器人 ebd60df124
fix: Use flex gap of space (#30023)
* fix: use flex gap when supported

* test: update snapshot

* refactor: Use single hooks
2021-04-06 11:38:36 +08:00

12 lines
273 B
TypeScript

import * as React from 'react';
import { detectFlexGapSupported } from '../styleChecker';
export default () => {
const [flexible, setFlexible] = React.useState(false);
React.useEffect(() => {
setFlexible(detectFlexGapSupported());
}, []);
return flexible;
};