import FolderIcon from "../icons/FolderIcon"; import FolderOpenIcon from "../icons/FolderOpenIcon"; const IconLayoutTwo = ({icon, categoryIcon = 'folder'}) => { const renderIcon = () => { // If custom image is provided and categoryIcon is not 'custom', show image in folder wrapper if (icon && categoryIcon !== 'custom') { return ; } // If custom image is provided and categoryIcon is 'custom', show just the image if (icon && categoryIcon === 'custom') { return betterdocs-category-icon; } // Show folder icons based on categoryIcon setting if (categoryIcon === 'folder-open') { return ; } return ; }; // For custom icons, don't wrap in folder span if (categoryIcon === 'custom') { return (
{renderIcon()}
); } // For folder icons, wrap in folder span with appropriate arrow class const arrowClass = categoryIcon === 'folder-open' ? 'arrow-down' : 'arrow-right'; return (
{renderIcon()}
); } export default IconLayoutTwo;