1+ import { CircleAlert , CircleCheck , CircleX , Clock , Eye , Pencil , Trash2 } from '@signozhq/icons' ;
12import {
23 Badge ,
34 DataTable as BaseDataTable ,
78 type Row ,
89} from '@signozhq/ui' ;
910import type { Meta , StoryObj } from '@storybook/react-vite' ;
10- import type { LucideIcon } from 'lucide-react' ;
11- import { AlertCircle , CheckCircle , Clock , Edit , Eye , Trash2 , XCircle } from 'lucide-react' ;
11+
12+ type IconComponent = React . ComponentType < { className ?: string ; size ?: number } > ;
13+
1214import * as React from 'react' ;
1315
1416// Create a properly typed wrapper component
@@ -278,16 +280,16 @@ const enhancedColumns: ColumnDef<User>[] = [
278280 const status = row . getValue ( 'status' ) as User [ 'status' ] ;
279281 const statusMap : Record <
280282 User [ 'status' ] ,
281- { label : string ; icon : LucideIcon ; className : string }
283+ { label : string ; icon : IconComponent ; className : string }
282284 > = {
283285 active : {
284286 label : 'Active' ,
285- icon : CheckCircle ,
287+ icon : CircleCheck ,
286288 className : 'bg-green-100 text-green-800 border-green-200' ,
287289 } ,
288290 inactive : {
289291 label : 'Inactive' ,
290- icon : XCircle ,
292+ icon : CircleX ,
291293 className : 'bg-red-100 text-red-800 border-red-200' ,
292294 } ,
293295 pending : {
@@ -297,7 +299,7 @@ const enhancedColumns: ColumnDef<User>[] = [
297299 } ,
298300 suspended : {
299301 label : 'Suspended' ,
300- icon : AlertCircle ,
302+ icon : CircleAlert ,
301303 className : 'bg-gray-100 text-gray-800 border-gray-200' ,
302304 } ,
303305 } ;
@@ -397,7 +399,7 @@ const enhancedColumns: ColumnDef<User>[] = [
397399 < Eye className = "h-4 w-4" />
398400 </ Button >
399401 < Button variant = "ghost" color = { ButtonColor . None } size = "sm" className = "h-8 w-8 p-0" >
400- < Edit className = "h-4 w-4" />
402+ < Pencil className = "h-4 w-4" />
401403 </ Button >
402404 < Button
403405 variant = "ghost"
@@ -630,11 +632,11 @@ export const Compact: StoryObj<typeof DataTable<User>> = {
630632 header : 'Status' ,
631633 cell : ( { row } : { row : Row < User > } ) => {
632634 const status = row . original . status ;
633- const statusMap : Record < User [ 'status' ] , { icon : LucideIcon ; className : string } > = {
634- active : { icon : CheckCircle , className : 'text-green-600' } ,
635- inactive : { icon : XCircle , className : 'text-red-600' } ,
635+ const statusMap : Record < User [ 'status' ] , { icon : IconComponent ; className : string } > = {
636+ active : { icon : CircleCheck , className : 'text-green-600' } ,
637+ inactive : { icon : CircleX , className : 'text-red-600' } ,
636638 pending : { icon : Clock , className : 'text-yellow-600' } ,
637- suspended : { icon : AlertCircle , className : 'text-gray-600' } ,
639+ suspended : { icon : CircleAlert , className : 'text-gray-600' } ,
638640 } ;
639641 const statusInfo = statusMap [ status ] ;
640642 const Icon = statusInfo . icon ;
@@ -840,12 +842,12 @@ export const AllFeatures: StoryObj<typeof DataTable<User>> = {
840842 > = {
841843 active : {
842844 label : 'Active' ,
843- icon : CheckCircle ,
845+ icon : CircleCheck ,
844846 className : 'bg-green-100 text-green-800 border-green-200' ,
845847 } ,
846848 inactive : {
847849 label : 'Inactive' ,
848- icon : XCircle ,
850+ icon : CircleX ,
849851 className : 'bg-red-100 text-red-800 border-red-200' ,
850852 } ,
851853 pending : {
@@ -855,7 +857,7 @@ export const AllFeatures: StoryObj<typeof DataTable<User>> = {
855857 } ,
856858 suspended : {
857859 label : 'Suspended' ,
858- icon : AlertCircle ,
860+ icon : CircleAlert ,
859861 className : 'bg-gray-100 text-gray-800 border-gray-200' ,
860862 } ,
861863 } ;
@@ -942,7 +944,7 @@ export const AllFeatures: StoryObj<typeof DataTable<User>> = {
942944 < Eye className = "h-4 w-4" />
943945 </ Button >
944946 < Button variant = "ghost" color = { ButtonColor . None } size = "sm" className = "h-8 w-8 p-0" >
945- < Edit className = "h-4 w-4" />
947+ < Pencil className = "h-4 w-4" />
946948 </ Button >
947949 < Button
948950 variant = "ghost"
@@ -1089,12 +1091,12 @@ export const VirtualizationWithFeatures: StoryObj<typeof DataTable<User>> = {
10891091 > = {
10901092 active : {
10911093 label : 'Active' ,
1092- icon : CheckCircle ,
1094+ icon : CircleCheck ,
10931095 className : 'bg-green-100 text-green-800 border-green-200' ,
10941096 } ,
10951097 inactive : {
10961098 label : 'Inactive' ,
1097- icon : XCircle ,
1099+ icon : CircleX ,
10981100 className : 'bg-red-100 text-red-800 border-red-200' ,
10991101 } ,
11001102 pending : {
@@ -1104,7 +1106,7 @@ export const VirtualizationWithFeatures: StoryObj<typeof DataTable<User>> = {
11041106 } ,
11051107 suspended : {
11061108 label : 'Suspended' ,
1107- icon : AlertCircle ,
1109+ icon : CircleAlert ,
11081110 className : 'bg-gray-100 text-gray-800 border-gray-200' ,
11091111 } ,
11101112 } ;
@@ -1191,7 +1193,7 @@ export const VirtualizationWithFeatures: StoryObj<typeof DataTable<User>> = {
11911193 < Eye className = "h-4 w-4" />
11921194 </ Button >
11931195 < Button variant = "ghost" color = { ButtonColor . None } size = "sm" className = "h-8 w-8 p-0" >
1194- < Edit className = "h-4 w-4" />
1196+ < Pencil className = "h-4 w-4" />
11951197 </ Button >
11961198 < Button
11971199 variant = "ghost"
@@ -1540,11 +1542,11 @@ export const StickyHeaders: StoryObj<typeof DataTable<User>> = {
15401542 header : 'Status' ,
15411543 size : 120 ,
15421544 cell : ( { row } : { row : Row < User > } ) => {
1543- const statusMap : Record < User [ 'status' ] , { icon : LucideIcon ; className : string } > = {
1544- active : { icon : CheckCircle , className : 'text-green-600' } ,
1545- inactive : { icon : XCircle , className : 'text-red-600' } ,
1545+ const statusMap : Record < User [ 'status' ] , { icon : IconComponent ; className : string } > = {
1546+ active : { icon : CircleCheck , className : 'text-green-600' } ,
1547+ inactive : { icon : CircleX , className : 'text-red-600' } ,
15461548 pending : { icon : Clock , className : 'text-yellow-600' } ,
1547- suspended : { icon : AlertCircle , className : 'text-orange-600' } ,
1549+ suspended : { icon : CircleAlert , className : 'text-orange-600' } ,
15481550 } ;
15491551 const status = statusMap [ row . original . status ] ;
15501552 const Icon = status . icon ;
0 commit comments