NodeChildren.tsx 378 B

1234567891011121314
  1. import React from 'react';
  2. import NodeComponent from '$app/components/document/Node/index';
  3. function NodeChildren({ childIds }: { childIds?: string[] }) {
  4. return childIds && childIds.length > 0 ? (
  5. <div className='pl-[1.5em]'>
  6. {childIds.map((item) => (
  7. <NodeComponent key={item} id={item} />
  8. ))}
  9. </div>
  10. ) : null;
  11. }
  12. export default NodeChildren;