@delvicons/icons
Version:
DelvIcons - Comprehensive icon library with static and animated SVG icons for all frameworks
29 lines (26 loc) • 844 B
text/typescript
export function createArrowRight(options = {}) {
const {
size = 24,
color = 'currentColor',
className = '',
animated = false,
...attrs
} = options;
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
svg.setAttribute('width', size.toString());
svg.setAttribute('height', size.toString());
svg.setAttribute('viewBox', '0 0 24 24');
svg.setAttribute('fill', 'none');
svg.className = [
'delv-icon',
'delv-icon-arrow-right',
animated ? 'delv-animated' : '',
className
].filter(Boolean).join(' ');
// Set additional attributes
Object.entries(attrs).forEach(([key, value]) => {
svg.setAttribute(key, value);
});
svg.innerHTML = `<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m9 18 6-6-6-6"/>`;
return svg;
}