MCPcopy Create free account
hub / github.com/DTStack/dt-react-component / isControlled

Function isControlled

src/drawer/index.tsx:61–63  ·  view source on GitHub ↗
(props: DrawerProps<T>)

Source from the content-addressed store, hash-verified

59}
60
61function isControlled<T extends readOnlyTab>(props: DrawerProps<T>): props is DrawerProps<T> {
62 return 'activeKey' in props;
63}
64
65const getWidthFromSize = (size: DrawerProps['size']) => {
66 if (size === 'small') return `${(DrawerSize.Small / 1440) * 100}%`;

Callers 2

DrawerFunction · 0.70
handleChangeKeyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected