Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const Props = ({ title, isToggle, isRaw, of: component }) => {
const components = useComponents();
const { props: stateProps } = React.useContext(doczState.context);
const PropsComponent = components.props;
const filename = get('__filemeta.filename', component);
const filemetaName = get('__filemeta.name', component);
const componentName = filemetaName || component.displayName || component.name;
const found =
stateProps &&
stateProps.length > 0 &&
stateProps.find(item =>
filename ? item.key === filename : item.key.includes(`${componentName}.`)
);
const value = get('value', found) || [];
const firstDefinition = first(value);
const definition = value.find(i => i.displayName === componentName);
const compileMarkdown = React.useMemo(