Files
veridian/app/composables/useFillIds.ts
T

13 lines
303 B
TypeScript

export const useFillIds = (namespace: string, length: number) => {
const instanceId = useId();
return Array.from({ length }, (_, i) => {
const id = `veridian-icons-${namespace}-${instanceId}-${i}`;
return {
fill: `url(#${id})`,
id,
};
});
}