diff --git a/packages/frontend/src/components/shared/Table/Table.theme.ts b/packages/frontend/src/components/shared/Table/Table.theme.ts new file mode 100644 index 00000000..664433a6 --- /dev/null +++ b/packages/frontend/src/components/shared/Table/Table.theme.ts @@ -0,0 +1,35 @@ +interface ThemeProps { + base: string; + header: string; + row: string; + columnHeaderCell: string; + rowHeaderCell: string; + cell: string; +} + +const primaryTheme: ThemeProps = { + base: 'min-w-full border-collapse', + header: 'border-b border-sky-950/opacity-5 font-medium leading-tight', + row: 'border-b border-sky-950/opacity-5', + columnHeaderCell: + 'p-4 text-sky-950 text-sm font-medium uppercase tracking-wider text-left', + rowHeaderCell: + 'p-4 text-slate-600 text-sm font-normal leading-tight text-left', + cell: 'p-4 whitespace-nowrap text-sm text-slate-600 font-normal text-left', +}; + +const secondaryTheme: ThemeProps = { + base: 'min-w-full border-collapse', + header: + 'p-2 border-b border-sky-950/5 text-sky-950 text-sm font-medium leading-tight', + row: 'text-left border-b border-gray-300/50', + columnHeaderCell: + 'px-6 py-3 text-xs font-medium uppercase tracking-wider text-gray-800', + rowHeaderCell: 'px-6 py-4 font-medium whitespace-nowrap text-gray-800', + cell: 'px-6 py-4 whitespace-nowrap text-sm text-gray-600', +}; + +export const tableTheme = { + primary: primaryTheme, + secondary: secondaryTheme, +}; diff --git a/packages/frontend/src/components/shared/Table/Table.tsx b/packages/frontend/src/components/shared/Table/Table.tsx index 7f5fd5bc..b04128f7 100644 --- a/packages/frontend/src/components/shared/Table/Table.tsx +++ b/packages/frontend/src/components/shared/Table/Table.tsx @@ -1,45 +1,60 @@ import React from 'react'; +import { tableTheme } from './Table.theme'; -const Header: React.FC<{ children: React.ReactNode }> = ({ children }) => ( - {children} -); -const Body: React.FC<{ children: React.ReactNode }> = ({ children }) => ( -
{children} -); -const Row: React.FC<{ children: React.ReactNode }> = ({ children }) => ( -