@wordpress/block-library
Version:
Block library for the WordPress editor.
21 lines (19 loc) • 437 B
JavaScript
/**
* WordPress dependencies
*/
import {
header as headerIcon,
footer as footerIcon,
sidebar as sidebarIcon,
symbolFilled as symbolFilledIcon,
} from '@wordpress/icons';
export const getTemplatePartIcon = ( iconName ) => {
if ( 'header' === iconName ) {
return headerIcon;
} else if ( 'footer' === iconName ) {
return footerIcon;
} else if ( 'sidebar' === iconName ) {
return sidebarIcon;
}
return symbolFilledIcon;
};