First Commit

This commit is contained in:
cesnimda
2026-03-21 11:55:27 +01:00
commit 2e8a29b4d0
1757 changed files with 166084 additions and 0 deletions
@@ -0,0 +1,19 @@
import PropTypes from 'prop-types';
// @third-party
import * as TablerIcons from '@tabler/icons-react';
/*************************** DYNAMIC - TABLER ICONS ***************************/
export default function DynamicIcon({ name, size = 24, color = 'black', stroke = 2 }) {
// Dynamically get the icon component based on the `name` prop
const IconComponent = TablerIcons[name];
// If the provided `name` does not match any icon in TablerIcons, return null to avoid rendering errors
if (!IconComponent) {
return null;
}
return <IconComponent {...{ size, color, stroke }} />;
}
DynamicIcon.propTypes = { name: PropTypes.any, size: PropTypes.number, color: PropTypes.string, stroke: PropTypes.number };