@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
9 lines (8 loc) • 343 B
JavaScript
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,
};
});