@workday/canvas-kit-labs-react
Version:
Canvas Kit Labs is an incubator for new and experimental components. Since we have a rather rigorous process for getting components in at a production level, it can be valuable to make them available earlier while we continuously iterate on the API/functi
10 lines (8 loc) • 324 B
text/typescript
import {createElemPropsHook} from '@workday/canvas-kit-react/common';
import {useExpandableModel} from './useExpandableModel';
export const useExpandableContent = createElemPropsHook(useExpandableModel)(({state}) => {
return {
style: state.visibility !== 'hidden' ? {} : {display: 'none'},
id: state.id,
};
});