mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 18:00:20 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
28 lines
592 B
TypeScript
28 lines
592 B
TypeScript
import { cn } from 'ui'
|
|
|
|
import { LEVELS } from '../DataTable.constants'
|
|
import { getLevelColor } from '../DataTable.utils'
|
|
|
|
export const DataTableColumnLevelIndicator = ({
|
|
value,
|
|
className,
|
|
dotClassName,
|
|
}: {
|
|
value: (typeof LEVELS)[number]
|
|
className?: string
|
|
dotClassName?: string
|
|
}) => {
|
|
return (
|
|
<div className={cn('flex items-center justify-center', className)}>
|
|
<div
|
|
className={cn(
|
|
'h-2.5 w-2.5 rounded-[2px]',
|
|
getLevelColor(value).bg,
|
|
getLevelColor(value).border,
|
|
dotClassName
|
|
)}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|