Skip to content

Commit 74e0b3a

Browse files
committed
Update icon resolution in StatisticRenderer to use named imports from lucide-react; change main entry point in package.json to .cjs
1 parent 338581b commit 74e0b3a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/components/src/renderers/data-display/statistic.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@
99
import { ComponentRegistry } from '@object-ui/core';
1010
import type { StatisticSchema } from '@object-ui/types';
1111
import { cn } from '../../lib/utils';
12-
import { TrendingUp, TrendingDown, Minus, icons } from 'lucide-react';
12+
import { TrendingUp, TrendingDown, Minus } from 'lucide-react';
13+
import * as LucideIcons from 'lucide-react';
1314

1415
// Helper to resolve icon
1516
const getIcon = (name: string) => {
1617
if (!name) return null;
1718
const pascalName = name.split('-').map(part => part.charAt(0).toUpperCase() + part.slice(1)).join('');
1819
// @ts-ignore
19-
const Icon = icons[pascalName] || icons[name];
20+
const Icon = LucideIcons[pascalName] || LucideIcons[name];
2021
return Icon;
2122
};
2223

packages/fields/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "Field renderers and registry for Object UI",
55
"license": "MIT",
66
"type": "module",
7-
"main": "./dist/index.js",
7+
"main": "./dist/index.cjs",
88
"module": "./dist/index.js",
99
"types": "./dist/index.d.ts",
1010
"sideEffects": true,

0 commit comments

Comments
 (0)