Skip to content

Database diagrams editor that allows you to visualize and design your DB with a single query.

add tailwind linter

Guy Ben-Aharone8f54c621a0b
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
index ae558951..5fd85583 100644
--- a/.eslintrc.cjs
+++ b/.eslintrc.cjs
@@ -7,10 +7,12 @@ module.exports = {
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
'plugin:prettier/recommended',
+ 'plugin:css-modules/recommended',
+ 'plugin:tailwindcss/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
- plugins: ['react-refresh'],
+ plugins: ['react-refresh', 'css-modules', 'tailwindcss'],
rules: {
'react-refresh/only-export-components': [
'warn',
diff --git a/package-lock.json b/package-lock.json
index eadb8a19..cdf07631 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -62,12 +62,14 @@
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-css-modules": "^2.12.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
+ "eslint-plugin-tailwindcss": "^3.17.4",
"husky": "^9.1.5",
"postcss": "^8.4.40",
"prettier": "^3.3.3",
@@ -5190,6 +5192,23 @@
"ms": "^2.1.1"
}
},
+ "node_modules/eslint-plugin-css-modules": {
+ "version": "2.12.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-css-modules/-/eslint-plugin-css-modules-2.12.0.tgz",
+ "integrity": "sha512-ruFBdad69ABrbCDCh5mXj7UzNmrvytfzPACjyvZWIAjFZAG8BXpYSbqmE8gU5wF+pIzV3jU2CWhLvfekXT/IgQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "gonzales-pe": "^4.3.0",
+ "lodash": "^4.17.2"
+ },
+ "engines": {
+ "node": ">=4.0.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=2.0.0"
+ }
+ },
"node_modules/eslint-plugin-import": {
"version": "2.29.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
@@ -5480,6 +5499,23 @@
"semver": "bin/semver.js"
}
},
+ "node_modules/eslint-plugin-tailwindcss": {
+ "version": "3.17.4",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-tailwindcss/-/eslint-plugin-tailwindcss-3.17.4.tgz",
+ "integrity": "sha512-gJAEHmCq2XFfUP/+vwEfEJ9igrPeZFg+skeMtsxquSQdxba9XRk5bn0Bp9jxG1VV9/wwPKi1g3ZjItu6MIjhNg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "fast-glob": "^3.2.5",
+ "postcss": "^8.4.4"
+ },
+ "engines": {
+ "node": ">=18.12.0"
+ },
+ "peerDependencies": {
+ "tailwindcss": "^3.4.0"
+ }
+ },
"node_modules/eslint-scope": {
"version": "7.2.2",
"resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
@@ -6108,6 +6144,22 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/gonzales-pe": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/gonzales-pe/-/gonzales-pe-4.3.0.tgz",
+ "integrity": "sha512-otgSPpUmdWJ43VXyiNgEYE4luzHCL2pz4wQ0OnDluC6Eg4Ko3Vexy/SrSynglw/eR+OhkzmqFCZa/OFa/RgAOQ==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "minimist": "^1.2.5"
+ },
+ "bin": {
+ "gonzales": "bin/gonzales.js"
+ },
+ "engines": {
+ "node": ">=0.6.0"
+ }
+ },
"node_modules/gopd": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
@@ -7046,6 +7098,13 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/lodash": {
+ "version": "4.17.21",
+ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+ "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
+ "dev": true,
+ "license": "MIT"
+ },
"node_modules/lodash.merge": {
"version": "4.6.2",
"resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
diff --git a/package.json b/package.json
index 5a4481b5..5bcdf69f 100644
--- a/package.json
+++ b/package.json
@@ -66,12 +66,14 @@
"eslint": "^8.57.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-prettier": "^9.1.0",
+ "eslint-plugin-css-modules": "^2.12.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsx-a11y": "^6.9.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-hooks": "^4.6.2",
"eslint-plugin-react-refresh": "^0.4.7",
+ "eslint-plugin-tailwindcss": "^3.17.4",
"husky": "^9.1.5",
"postcss": "^8.4.40",
"prettier": "^3.3.3",
diff --git a/src/components/accordion/accordion.tsx b/src/components/accordion/accordion.tsx
index 7acb77b5..b0afe19b 100644
--- a/src/components/accordion/accordion.tsx
+++ b/src/components/accordion/accordion.tsx
@@ -25,7 +25,7 @@ const AccordionTrigger = React.forwardRef<
}
>(({ className, children, iconPosition = 'left', ...props }, ref) => {
const renderIcon = () => (
- <ChevronDownIcon className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
+ <ChevronDownIcon className="size-4 shrink-0 text-muted-foreground transition-transform duration-200" />
);
return (
<AccordionPrimitive.Header className="flex">
diff --git a/src/components/button/button-variants.tsx b/src/components/button/button-variants.tsx
index e7b106ae..38da6bc2 100644
--- a/src/components/button/button-variants.tsx
+++ b/src/components/button/button-variants.tsx
@@ -20,7 +20,7 @@ export const buttonVariants = cva(
default: 'h-9 px-4 py-2',
sm: 'h-8 rounded-md px-3 text-xs',
lg: 'h-10 rounded-md px-8',
- icon: 'h-9 w-9',
+ icon: 'size-9',
},
},
defaultVariants: {
diff --git a/src/components/checkbox/checkbox.tsx b/src/components/checkbox/checkbox.tsx
index b909292f..98ad7e71 100644
--- a/src/components/checkbox/checkbox.tsx
+++ b/src/components/checkbox/checkbox.tsx
@@ -19,7 +19,7 @@ const Checkbox = React.forwardRef<
<CheckboxPrimitive.Indicator
className={cn('flex items-center justify-center text-current')}
>
- <CheckIcon className="h-4 w-4" />
+ <CheckIcon className="size-4" />
</CheckboxPrimitive.Indicator>
</CheckboxPrimitive.Root>
));
diff --git a/src/components/combobox/combobox.tsx b/src/components/combobox/combobox.tsx
index 14fd38a1..d9975def 100644
--- a/src/components/combobox/combobox.tsx
+++ b/src/components/combobox/combobox.tsx
@@ -65,11 +65,11 @@ export const Combobox = React.forwardRef<HTMLDivElement, ComboboxProps>(
variant="outline"
role="combobox"
aria-expanded={open}
- className="w-full justify-between h-auto"
+ className="h-auto w-full justify-between"
>
{selected && selected.length > 0 ? (
- <div className="relative mr-auto flex flex-grow flex-wrap items-center overflow-hidden">
- <span className="overflow-hidden whitespace-nowrap text-ellipsis">
+ <div className="relative mr-auto flex grow flex-wrap items-center overflow-hidden">
+ <span className="truncate">
{mode === 'multiple' &&
Array.isArray(selected)
? selected
@@ -94,7 +94,7 @@ export const Combobox = React.forwardRef<HTMLDivElement, ComboboxProps>(
{placeholder ?? 'Select Item...'}
</div>
)}
- <ChevronsUpDown className="ml-2 h-4 w-4 shrink-0 opacity-50" />
+ <ChevronsUpDown className="ml-2 size-4 shrink-0 opacity-50" />
</Button>
</PopoverTrigger>
<PopoverContent
diff --git a/src/components/command/command.tsx b/src/components/command/command.tsx
index 7093e391..46a7d095 100644
--- a/src/components/command/command.tsx
+++ b/src/components/command/command.tsx
@@ -27,7 +27,7 @@ const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="overflow-hidden p-0">
- <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[data-cmdk-input-wrapper]_svg]:h-5 [&_[data-cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
+ <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:size-5 [&_[data-cmdk-input-wrapper]_svg]:size-5">
{children}
</Command>
</DialogContent>
@@ -40,7 +40,7 @@ const CommandInput = React.forwardRef<
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
<div className="flex items-center border-b px-3" data-cmdk-input-wrapper="">
- <MagnifyingGlassIcon className="mr-2 h-4 w-4 shrink-0 opacity-50" />
+ <MagnifyingGlassIcon className="mr-2 size-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
ref={ref}
className={cn(
diff --git a/src/components/command/dialog.tsx b/src/components/command/dialog.tsx
index 457e32d1..652d6454 100644
--- a/src/components/command/dialog.tsx
+++ b/src/components/command/dialog.tsx
@@ -43,7 +43,7 @@ const DialogContent = React.forwardRef<
>
{children}
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
- <Cross2Icon className="h-4 w-4" />
+ <Cross2Icon className="size-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
</DialogPrimitive.Content>
diff --git a/src/components/dialog/dialog.tsx b/src/components/dialog/dialog.tsx
index 0f89f9b6..2a38d96b 100644
--- a/src/components/dialog/dialog.tsx
+++ b/src/components/dialog/dialog.tsx
@@ -46,7 +46,7 @@ const DialogContent = React.forwardRef<
{children}
{showClose && (
<DialogPrimitive.Close className="absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground">
- <Cross2Icon className="h-4 w-4" />
+ <Cross2Icon className="size-4" />
<span className="sr-only">Close</span>
</DialogPrimitive.Close>
)}
diff --git a/src/components/dropdown-menu/dropdown-menu.tsx b/src/components/dropdown-menu/dropdown-menu.tsx
index f2fa8852..3c1fdaae 100644
--- a/src/components/dropdown-menu/dropdown-menu.tsx
+++ b/src/components/dropdown-menu/dropdown-menu.tsx
@@ -36,7 +36,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
{...props}
>
{children}
- <ChevronRightIcon className="ml-auto h-4 w-4" />
+ <ChevronRightIcon className="ml-auto size-4" />
</DropdownMenuPrimitive.SubTrigger>
));
DropdownMenuSubTrigger.displayName =
@@ -108,9 +108,9 @@ const DropdownMenuCheckboxItem = React.forwardRef<
checked={checked}
{...props}
>
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <span className="absolute left-2 flex size-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
- <CheckIcon className="h-4 w-4" />
+ <CheckIcon className="size-4" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
@@ -131,9 +131,9 @@ const DropdownMenuRadioItem = React.forwardRef<
)}
{...props}
>
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <span className="absolute left-2 flex size-3.5 items-center justify-center">
<DropdownMenuPrimitive.ItemIndicator>
- <DotFilledIcon className="h-4 w-4 fill-current" />
+ <DotFilledIcon className="size-4 fill-current" />
</DropdownMenuPrimitive.ItemIndicator>
</span>
{children}
diff --git a/src/components/empty-state/empty-state.tsx b/src/components/empty-state/empty-state.tsx
index 684e41fa..c2240ede 100644
--- a/src/components/empty-state/empty-state.tsx
+++ b/src/components/empty-state/empty-state.tsx
@@ -20,8 +20,8 @@ export const EmptyState = forwardRef<
)}
>
<img src={EmptyStateImage} alt="Empty state" className="w-32" />
- <Label className="text-md">{title}</Label>
- <Label className="font-normal text-muted-foreground text-sm">
+ <Label className="text-base">{title}</Label>
+ <Label className="text-sm font-normal text-muted-foreground">
{description}
</Label>
</div>
diff --git a/src/components/menubar/menubar.tsx b/src/components/menubar/menubar.tsx
index 12689c19..5b79f733 100644
--- a/src/components/menubar/menubar.tsx
+++ b/src/components/menubar/menubar.tsx
@@ -64,7 +64,7 @@ const MenubarSubTrigger = React.forwardRef<
{...props}
>
{children}
- <ChevronRightIcon className="ml-auto h-4 w-4" />
+ <ChevronRightIcon className="ml-auto size-4" />
</MenubarPrimitive.SubTrigger>
));
MenubarSubTrigger.displayName = MenubarPrimitive.SubTrigger.displayName;
@@ -146,9 +146,9 @@ const MenubarCheckboxItem = React.forwardRef<
checked={checked}
{...props}
>
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <span className="absolute left-2 flex size-3.5 items-center justify-center">
<MenubarPrimitive.ItemIndicator>
- <CheckIcon className="h-4 w-4" />
+ <CheckIcon className="size-4" />
</MenubarPrimitive.ItemIndicator>
</span>
{children}
@@ -168,9 +168,9 @@ const MenubarRadioItem = React.forwardRef<
)}
{...props}
>
- <span className="absolute left-2 flex h-3.5 w-3.5 items-center justify-center">
+ <span className="absolute left-2 flex size-3.5 items-center justify-center">
<MenubarPrimitive.ItemIndicator>
- <DotFilledIcon className="h-4 w-4 fill-current" />
+ <DotFilledIcon className="size-4 fill-current" />
</MenubarPrimitive.ItemIndicator>
</span>
{children}
diff --git a/src/components/resizable/resizable.tsx b/src/components/resizable/resizable.tsx
index d61a479e..d8a74330 100644
--- a/src/components/resizable/resizable.tsx
+++ b/src/components/resizable/resizable.tsx
@@ -35,7 +35,7 @@ const ResizableHandle = ({
>
{withHandle && (
<div className="z-10 flex h-4 w-3 items-center justify-center rounded-sm border bg-border">
- <DragHandleDots2Icon className="h-2.5 w-2.5" />
+ <DragHandleDots2Icon className="size-2.5" />
</div>
)}
</ResizablePrimitive.PanelResizeHandle>
diff --git a/src/components/scroll-area/scroll-area.tsx b/src/components/scroll-area/scroll-area.tsx
index dcd3420c..267001dd 100644
--- a/src/components/scroll-area/scroll-area.tsx
+++ b/src/components/scroll-area/scroll-area.tsx
@@ -12,7 +12,7 @@ const ScrollArea = React.forwardRef<
className={cn('relative overflow-hidden', className)}
{...props}
>
- <ScrollAreaPrimitive.Viewport className="h-full w-full rounded-[inherit] scrollable-flex">
+ <ScrollAreaPrimitive.Viewport className="scrollable-flex size-full rounded-[inherit]">
{children}
</ScrollAreaPrimitive.Viewport>
<ScrollBar />
diff --git a/src/components/select/select.tsx b/src/components/select/select.tsx
index bac1a00c..29943780 100644
--- a/src/components/select/select.tsx
+++ b/src/components/select/select.tsx
@@ -29,7 +29,7 @@ const SelectTrigger = React.forwardRef<
>
{children}
<SelectPrimitive.Icon asChild>
- <CaretSortIcon className="h-4 w-4 opacity-50" />
+ <CaretSortIcon className="size-4 opacity-50" />
</SelectPrimitive.Icon>
</SelectPrimitive.Trigger>
));
@@ -126,9 +126,9 @@ const SelectItem = React.forwardRef<
)}
{...props}
>
- <span className="absolute right-2 flex h-3.5 w-3.5 items-center justify-center">
+ <span className="absolute right-2 flex size-3.5 items-center justify-center">
<SelectPrimitive.ItemIndicator>
- <CheckIcon className="h-4 w-4" />
+ <CheckIcon className="size-4" />
</SelectPrimitive.ItemIndicator>
</span>
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
diff --git a/src/components/toast/toast.tsx b/src/components/toast/toast.tsx
index c1ea5f44..9d359642 100644
--- a/src/components/toast/toast.tsx
+++ b/src/components/toast/toast.tsx
@@ -21,7 +21,7 @@ const ToastViewport = React.forwardRef<
/>
));
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
-
+// eslint-disable-next-line tailwindcss/no-custom-classname
const toastVariants = cva(
'group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full',
{
@@ -81,7 +81,7 @@ const ToastClose = React.forwardRef<
toast-close=""
{...props}
>
- <Cross2Icon className="h-4 w-4" />
+ <Cross2Icon className="size-4" />
</ToastPrimitives.Close>
));
ToastClose.displayName = ToastPrimitives.Close.displayName;
diff --git a/src/context/full-screen-spinner-context/full-screen-spinner-provider.tsx b/src/context/full-screen-spinner-context/full-screen-spinner-provider.tsx
index 746f4eab..cf80a01a 100644
--- a/src/context/full-screen-spinner-context/full-screen-spinner-provider.tsx
+++ b/src/context/full-screen-spinner-context/full-screen-spinner-provider.tsx
@@ -36,9 +36,9 @@ export const FullScreenLoaderProvider: React.FC<React.PropsWithChildren> = ({
>
{children}
<Dialog open={open}>
- <DialogContent className="shadow-none bg-transparent border-none outline-none justify-center">
+ <DialogContent className="justify-center border-none bg-transparent shadow-none outline-none">
<DialogTitle className="hidden"></DialogTitle>
- <div className="bg-white w-fit p-3 rounded-xl">
+ <div className="w-fit rounded-xl bg-white p-3">
{animated ? (
<Spinner size={'large'} />
) : (
diff --git a/src/dialogs/create-diagram-dialog/create-diagram-dialog.tsx b/src/dialogs/create-diagram-dialog/create-diagram-dialog.tsx
index 27713725..1e35cd63 100644
--- a/src/dialogs/create-diagram-dialog/create-diagram-dialog.tsx
+++ b/src/dialogs/create-diagram-dialog/create-diagram-dialog.tsx
@@ -167,7 +167,7 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
<ToggleGroupItem
value={type}
aria-label="Toggle bold"
- className="flex w-20 h-20 md:w-32 md:h-32"
+ className="flex size-20 md:size-32"
>
<img src={logo} alt="PostgreSQL" />
</ToggleGroupItem>
@@ -177,10 +177,10 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
const renderExamplesOption = useCallback(
() => (
<div
- className="flex w-20 h-20 md:w-32 md:h-32 rounded-md items-center text-center flex-col py-3 border cursor-pointer"
+ className="flex size-20 cursor-pointer flex-col items-center rounded-md border py-3 text-center md:size-32"
onClick={() => window.open('/examples')}
>
- <div className="flex items-center flex-1">
+ <div className="flex flex-1 items-center">
<Link href="/examples" className="text-sm text-primary">
<LayoutGrid size={34} />
</Link>
@@ -188,13 +188,13 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
<div className="flex flex-col-reverse">
<Link
href="/examples"
- className="hidden md:flex text-sm text-primary"
+ className="hidden text-sm text-primary md:flex"
>
Check Examples
</Link>
<Link
href="/examples"
- className="flex md:hidden text-xs text-primary"
+ className="flex text-xs text-primary md:hidden"
>
Examples
</Link>
@@ -245,7 +245,7 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
}
}}
type="single"
- className="grid grid-cols-3 grid-flow-row gap-6"
+ className="grid grid-flow-row grid-cols-3 gap-6"
>
{renderDatabaseOption(DatabaseType.MYSQL)}
{renderDatabaseOption(DatabaseType.POSTGRESQL)}
@@ -258,15 +258,15 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
);
case CreateDiagramDialogStep.IMPORT_DATABASE:
return (
- <div className="flex flex-1 flex-col w-full gap-6">
+ <div className="flex w-full flex-1 flex-col gap-6">
{databaseTypeToEditionMap[databaseType].length > 0 ? (
- <div className="flex flex-col md:flex-row gap-1">
- <p className="text-sm text-muted-foreground leading-6">
+ <div className="flex flex-col gap-1 md:flex-row">
+ <p className="text-sm leading-6 text-muted-foreground">
Database edition:
</p>
<ToggleGroup
type="single"
- className="gap-2 ml-1"
+ className="ml-1 gap-2"
value={
!databaseEdition
? 'regular'
@@ -283,9 +283,9 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
<ToggleGroupItem
value="regular"
variant="outline"
- className="gap-1 h-6 p-0 px-2 shadow-none"
+ className="h-6 gap-1 p-0 px-2 shadow-none"
>
- <Avatar className="h-4 w-4">
+ <Avatar className="size-4">
<AvatarImage
src={
databaseSecondaryLogoMap[
@@ -306,9 +306,9 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
value={edition}
key={edition}
variant="outline"
- className="gap-1 h-6 p-0 px-2 shadow-none"
+ className="h-6 gap-1 p-0 px-2 shadow-none"
>
- <Avatar className="h-4 w-4">
+ <Avatar className="size-4">
<AvatarImage
src={
databaseEditionToImageMap[
@@ -351,18 +351,18 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
})}
/>
</div>
- <div className="flex flex-col gap-1 h-48">
+ <div className="flex h-48 flex-col gap-1">
<p className="text-sm text-muted-foreground">
2. Paste the script result here:
</p>
<Textarea
- className="flex-1 w-full p-2 text-sm bg-muted-1 rounded-md"
+ className="w-full flex-1 rounded-md bg-muted p-2 text-sm"
placeholder="Script result here..."
value={scriptResult}
onChange={handleInputChange}
/>
{errorMessage && (
- <p className="text-red-700 text-sm mt-2">
+ <p className="mt-2 text-sm text-red-700">
{errorMessage}
</p>
)}
@@ -387,7 +387,7 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
switch (step) {
case CreateDiagramDialogStep.SELECT_DATABASE:
return (
- <DialogFooter className="flex !justify-between gap-2 mt-4">
+ <DialogFooter className="mt-4 flex !justify-between gap-2">
{hasExistingDiagram ? (
<DialogClose asChild>
<Button type="button" variant="secondary">
@@ -422,7 +422,7 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
);
case CreateDiagramDialogStep.IMPORT_DATABASE:
return (
- <DialogFooter className="flex !justify-between gap-2 mt-4">
+ <DialogFooter className="mt-4 flex !justify-between gap-2">
<div className="flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2">
<Button
type="button"
@@ -488,7 +488,7 @@ export const CreateDiagramDialog: React.FC<CreateDiagramDialogProps> = ({
}}
>
<DialogContent
- className="flex flex-col w-[90vw] xl:min-w-[45vw] overflow-y-auto"
+ className="flex w-[90vw] flex-col overflow-y-auto xl:min-w-[45vw]"
showClose={hasExistingDiagram}
>
{renderHeader()}
diff --git a/src/dialogs/export-sql-dialog/export-sql-dialog.tsx b/src/dialogs/export-sql-dialog/export-sql-dialog.tsx
index e84e84b3..d6ec8ce0 100644
--- a/src/dialogs/export-sql-dialog/export-sql-dialog.tsx
+++ b/src/dialogs/export-sql-dialog/export-sql-dialog.tsx
@@ -63,8 +63,8 @@ export const ExportSQLDialog: React.FC<ExportSQLDialogProps> = ({
const renderError = useCallback(
() => (
<div className="flex flex-col gap-2">
- <div className="flex items-center justify-center flex-col text-sm gap-1">
- <Annoyed className="w-10 h-10" />
+ <div className="flex flex-col items-center justify-center gap-1 text-sm">
+ <Annoyed className="size-10" />
<Label className="text-sm">
Error generating SQL script. Please try again later or{' '}
<a
@@ -123,7 +123,7 @@ export const ExportSQLDialog: React.FC<ExportSQLDialogProps> = ({
}}
>
<DialogContent
- className="flex flex-col min-w-[500px] xl:min-w-[75vw] max-h-[80vh] overflow-y-auto"
+ className="flex max-h-[80vh] min-w-[500px] flex-col overflow-y-auto xl:min-w-[75vw]"
showClose
>
<DialogHeader>
diff --git a/src/dialogs/open-diagram-dialog/open-diagram-dialog.tsx b/src/dialogs/open-diagram-dialog/open-diagram-dialog.tsx
index 7b44b5a8..e1f16827 100644
--- a/src/dialogs/open-diagram-dialog/open-diagram-dialog.tsx
+++ b/src/dialogs/open-diagram-dialog/open-diagram-dialog.tsx
@@ -74,7 +74,7 @@ export const OpenDiagramDialog: React.FC<OpenDiagramDialogProps> = ({
}}
>
<DialogContent
- className="flex flex-col md:w-[100vw] w-[90vw] xl:min-w-[55vw] max-h-[90vh] overflow-y-auto"
+ className="flex max-h-[90vh] w-[90vw] flex-col overflow-y-auto md:w-screen xl:min-w-[55vw]"
showClose
>
<DialogHeader>
@@ -90,7 +90,7 @@ export const OpenDiagramDialog: React.FC<OpenDiagramDialogProps> = ({
<TableRow>
<TableHead />
<TableHead>Name</TableHead>
- <TableHead className="sm:inline-flex items-center hidden">
+ <TableHead className="hidden items-center sm:inline-flex">
Created at
</TableHead>
<TableHead>Last modified</TableHead>
@@ -126,7 +126,7 @@ export const OpenDiagramDialog: React.FC<OpenDiagramDialogProps> = ({
<DiagramIcon diagram={diagram} />
</TableCell>
<TableCell>{diagram.name}</TableCell>
- <TableCell className="sm:inline-flex items-center hidden">
+ <TableCell className="hidden items-center sm:inline-flex">
{diagram.createdAt.toLocaleString()}
</TableCell>
<TableCell>
diff --git a/src/pages/editor-page/canvas/canvas.tsx b/src/pages/editor-page/canvas/canvas.tsx
index 7acd6f6e..a621602e 100644
--- a/src/pages/editor-page/canvas/canvas.tsx
+++ b/src/pages/editor-page/canvas/canvas.tsx
@@ -285,7 +285,7 @@ export const Canvas: React.FC<CanvasProps> = () => {
className="!shadow-none"
>
<Button
- className="bg-pink-600 hover:bg-pink-500 w-11 h-11 p-2"
+ className="size-11 bg-pink-600 p-2 hover:bg-pink-500"
onClick={showSidePanel}
>
<Pencil />
diff --git a/src/pages/editor-page/canvas/table-edge.tsx b/src/pages/editor-page/canvas/table-edge.tsx
index c54c9648..08d4ef55 100644
--- a/src/pages/editor-page/canvas/table-edge.tsx
+++ b/src/pages/editor-page/canvas/table-edge.tsx
@@ -146,6 +146,7 @@ export const TableEdge: React.FC<EdgeProps<TableEdgeType>> = ({
fill="none"
strokeOpacity={0}
strokeWidth={20}
+ // eslint-disable-next-line tailwindcss/no-custom-classname
className="react-flow__edge-interaction"
onClick={(e) => {
if (e.detail === 2) {
diff --git a/src/pages/editor-page/canvas/table-node-field.tsx b/src/pages/editor-page/canvas/table-node-field.tsx
index 34b1cac8..8a50cd26 100644
--- a/src/pages/editor-page/canvas/table-node-field.tsx
+++ b/src/pages/editor-page/canvas/table-node-field.tsx
@@ -42,7 +42,7 @@ export const TableNodeField: React.FC<TableNodeFieldProps> = ({
}, [tableNodeId, updateNodeInternals, numberOfEdgesToField]);
return (
- <div className="flex relative items-center h-8 text-sm px-3 border-t justify-between hover:bg-slate-100 group last:rounded-b-[6px]">
+ <div className="group relative flex h-8 items-center justify-between border-t px-3 text-sm last:rounded-b-[6px] hover:bg-slate-100">
{!connection.inProgress && (
<>
<Handle
@@ -77,7 +77,7 @@ export const TableNodeField: React.FC<TableNodeFieldProps> = ({
id={`${TARGET_ID_PREFIX}${numberOfEdgesToField}_${field.id}`}
className={
isTarget
- ? '!w-full !h-full !absolute !top-0 !left-0 !rounded-none !border-none !transform-none !opacity-0'
+ ? '!absolute !left-0 !top-0 !h-full !w-full !transform-none !rounded-none !border-none !opacity-0'
: `!invisible`
}
position={Position.Left}
@@ -85,29 +85,27 @@ export const TableNodeField: React.FC<TableNodeFieldProps> = ({
/>
</>
)}
- <div className="block w-2/3 text-left overflow-hidden whitespace-nowrap text-ellipsis">
- {field.name}
- </div>
- <div className="flex justify-end w-2/3 gap-2">
+ <div className="block w-2/3 truncate text-left">{field.name}</div>
+ <div className="flex w-2/3 justify-end gap-2">
{field.primaryKey ? (
<div className="text-muted-foreground group-hover:hidden">
<KeyRound size={14} />
</div>
) : null}
- <div className="text-muted-foreground group-hover:hidden content-center text-xs text-right overflow-hidden whitespace-nowrap text-ellipsis">
+ <div className="content-center truncate text-right text-xs text-muted-foreground group-hover:hidden">
{field.type.name}
</div>
- <div className="flex-row hidden group-hover:flex">
+ <div className="hidden flex-row group-hover:flex">
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-0 w-6 h-6"
+ className="size-6 p-0 hover:bg-primary-foreground"
onClick={(e) => {
e.stopPropagation();
removeField(tableNodeId, field.id);
}}
>
- <Trash2 className="h-3.5 w-3.5 text-red-700" />
+ <Trash2 className="size-3.5 text-red-700" />
</Button>
</div>
</div>
diff --git a/src/pages/editor-page/canvas/table-node.tsx b/src/pages/editor-page/canvas/table-node.tsx
index 0810da87..cde01022 100644
--- a/src/pages/editor-page/canvas/table-node.tsx
+++ b/src/pages/editor-page/canvas/table-node.tsx
@@ -56,7 +56,7 @@ export const TableNode: React.FC<NodeProps<TableNodeType>> = ({
return (
<div
- className={`flex flex-col w-full bg-slate-50 border-2 ${selected ? 'border-pink-600' : 'border-slate-500'} rounded-lg shadow-sm`}
+ className={`flex w-full flex-col border-2 bg-slate-50 ${selected ? 'border-pink-600' : 'border-slate-500'} rounded-lg shadow-sm`}
onClick={(e) => {
if (e.detail === 2) {
openTableInEditor();
@@ -75,24 +75,24 @@ export const TableNode: React.FC<NodeProps<TableNodeType>> = ({
className="h-2 rounded-t-[6px]"
style={{ backgroundColor: table.color }}
></div>
- <div className="flex items-center h-9 bg-slate-200 px-2 justify-between group">
- <div className="flex items-center gap-1 min-w-0 flex-1">
- <Table2 className="h-3.5 w-3.5 text-gray-600 shrink-0" />
- <Label className="text-sm font-bold truncate">
+ <div className="group flex h-9 items-center justify-between bg-slate-200 px-2">
+ <div className="flex min-w-0 flex-1 items-center gap-1">
+ <Table2 className="size-3.5 shrink-0 text-gray-600" />
+ <Label className="truncate text-sm font-bold">
{table.name}
</Label>
</div>
- <div className="flex-row hidden group-hover:flex shrink-0">
+ <div className="hidden shrink-0 flex-row group-hover:flex">
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-0 w-6 h-6 text-slate-500 hover:text-slate-700"
+ className="size-6 p-0 text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
onClick={openTableInEditor}
>
- <Pencil className="h-4 w-4" />
+ <Pencil className="size-4" />
</Button>
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-0 w-6 h-6 text-slate-500 hover:text-slate-700"
+ className="size-6 p-0 text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
onClick={
table.width !== MAX_TABLE_SIZE
? expandTable
@@ -100,9 +100,9 @@ export const TableNode: React.FC<NodeProps<TableNodeType>> = ({
}
>
{table.width !== MAX_TABLE_SIZE ? (
- <ChevronsLeftRight className="h-4 w-4" />
+ <ChevronsLeftRight className="size-4" />
) : (
- <ChevronsRightLeft className="h-4 w-4" />
+ <ChevronsRightLeft className="size-4" />
)}
</Button>
</div>
diff --git a/src/pages/editor-page/canvas/toolbar/toolbar-button.tsx b/src/pages/editor-page/canvas/toolbar/toolbar-button.tsx
index ba90c215..a449373c 100644
--- a/src/pages/editor-page/canvas/toolbar/toolbar-button.tsx
+++ b/src/pages/editor-page/canvas/toolbar/toolbar-button.tsx
@@ -5,7 +5,7 @@ export const ToolbarButton: React.FC<ButtonProps> = (props) => {
return (
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-2 w-[36px]"
+ className="w-[36px] p-2 hover:bg-primary-foreground"
{...props}
/>
);
diff --git a/src/pages/editor-page/canvas/toolbar/toolbar.tsx b/src/pages/editor-page/canvas/toolbar/toolbar.tsx
index 513b6842..106b9d89 100644
--- a/src/pages/editor-page/canvas/toolbar/toolbar.tsx
+++ b/src/pages/editor-page/canvas/toolbar/toolbar.tsx
@@ -50,8 +50,8 @@ export const Toolbar: React.FC<ToolbarProps> = () => {
return (
<div className="px-1">
- <Card className="shadow-none p-0 bg-secondary h-[44px]">
- <CardContent className="p-1 flex flex-row h-full items-center">
+ <Card className="h-[44px] bg-secondary p-0 shadow-none">
+ <CardContent className="flex h-full flex-row items-center p-1">
<Tooltip>
<TooltipTrigger asChild>
<span>
diff --git a/src/pages/editor-page/side-panel/list-item-header-button/list-item-header-button.tsx b/src/pages/editor-page/side-panel/list-item-header-button/list-item-header-button.tsx
index 8228f236..ad68604c 100644
--- a/src/pages/editor-page/side-panel/list-item-header-button/list-item-header-button.tsx
+++ b/src/pages/editor-page/side-panel/list-item-header-button/list-item-header-button.tsx
@@ -9,7 +9,7 @@ export const ListItemHeaderButton: React.FC<ButtonProps> = React.forwardRef<
<Button
ref={ref}
variant="ghost"
- className="hover:bg-primary-foreground hover:cursor-pointer p-2 w-8 h-8 text-slate-500 hover:text-slate-700"
+ className="size-8 p-2 text-slate-500 hover:cursor-pointer hover:bg-primary-foreground hover:text-slate-700"
asChild
{...props}
/>
diff --git a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-content/relationship-list-item-content.tsx b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-content/relationship-list-item-content.tsx
index 9eb80727..82d7af85 100644
--- a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-content/relationship-list-item-content.tsx
+++ b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-content/relationship-list-item-content.tsx
@@ -49,19 +49,19 @@ export const RelationshipListItemContent: React.FC<
}, [relationship.id, removeRelationship, deleteElements]);
return (
- <div className="rounded-b-md px-1 flex flex-col my-1">
+ <div className="my-1 flex flex-col rounded-b-md px-1">
<div className="flex flex-col gap-6">
- <div className="flex justify-between items-center gap-1 text-xs">
- <div className="flex flex-col gap-2 text-xs overflow-hidden">
+ <div className="flex items-center justify-between gap-1 text-xs">
+ <div className="flex flex-col gap-2 overflow-hidden text-xs">
<div className="flex flex-row items-center gap-1">
- <FileMinus2 className="h-4 w-4 text-slate-700" />
+ <FileMinus2 className="size-4 text-slate-700" />
<div className="font-bold text-slate-700">
Primary
</div>
</div>
<Tooltip>
<TooltipTrigger>
- <div className="text-sm overflow-hidden whitespace-nowrap text-ellipsis ">
+ <div className="truncate text-sm ">
{targetTable?.name}({targetField?.name})
</div>
</TooltipTrigger>
@@ -70,16 +70,16 @@ export const RelationshipListItemContent: React.FC<
</TooltipContent>
</Tooltip>
</div>
- <div className="flex flex-col gap-2 text-xs overflow-hidden">
+ <div className="flex flex-col gap-2 overflow-hidden text-xs">
<div className="flex flex-row items-center gap-1">
- <FileOutput className="h-4 w-4 text-slate-700" />
+ <FileOutput className="size-4 text-slate-700" />
<div className="font-bold text-slate-700">
Foreign
</div>
</div>
<Tooltip>
<TooltipTrigger>
- <div className="text-sm overflow-hidden whitespace-nowrap text-ellipsis ">
+ <div className="truncate text-sm ">
{sourceTable?.name}({sourceField?.name})
</div>
</TooltipTrigger>
@@ -91,7 +91,7 @@ export const RelationshipListItemContent: React.FC<
</div>
<div className="flex flex-col gap-2 text-xs">
<div className="flex flex-row items-center gap-1">
- <FileOutput className="h-4 w-4 text-slate-700" />
+ <FileOutput className="size-4 text-slate-700" />
<div className="font-bold text-slate-700">
Cardinality
</div>
@@ -122,13 +122,13 @@ export const RelationshipListItemContent: React.FC<
</Select>
</div>
</div>
- <div className="flex items-center justify-center flex-1 pt-2">
+ <div className="flex flex-1 items-center justify-center pt-2">
<Button
variant="ghost"
- className="text-xs h-8 p-2"
+ className="h-8 p-2 text-xs"
onClick={deleteRelationshipHandler}
>
- <Trash2 className="h-3.5 w-3.5 mr-1 text-red-700" />
+ <Trash2 className="mr-1 size-3.5 text-red-700" />
<div className="text-red-700">Delete</div>
</Button>
</div>
diff --git a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-header/relationship-list-item-header.tsx b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-header/relationship-list-item-header.tsx
index 3182a93c..affb8ba1 100644
--- a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-header/relationship-list-item-header.tsx
+++ b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item-header/relationship-list-item-header.tsx
@@ -133,7 +133,7 @@ export const RelationshipListItemHeader: React.FC<
className="flex justify-between !text-red-700"
>
Delete
- <Trash2 className="text-red-700 w-3.5 h-3.5" />
+ <Trash2 className="size-3.5 text-red-700" />
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
@@ -143,8 +143,8 @@ export const RelationshipListItemHeader: React.FC<
);
return (
- <div className="h-11 flex items-center justify-between flex-1 group overflow-hidden">
- <div className="flex flex-1 min-w-0">
+ <div className="group flex h-11 flex-1 items-center justify-between overflow-hidden">
+ <div className="flex min-w-0 flex-1">
{editMode ? (
<Input
ref={inputRef}
@@ -154,7 +154,7 @@ export const RelationshipListItemHeader: React.FC<
value={relationshipName}
onClick={(e) => e.stopPropagation()}
onChange={(e) => setRelationshipName(e.target.value)}
- className="h-7 focus-visible:ring-0 w-full"
+ className="h-7 w-full focus-visible:ring-0"
/>
) : (
<div className="truncate">{relationship.name}</div>
@@ -164,7 +164,7 @@ export const RelationshipListItemHeader: React.FC<
{!editMode ? (
<>
<div>{renderDropDownMenu()}</div>
- <div className="flex md:hidden md:group-hover:flex flex-row-reverse">
+ <div className="flex flex-row-reverse md:hidden md:group-hover:flex">
<ListItemHeaderButton onClick={enterEditMode}>
<Pencil />
</ListItemHeaderButton>
diff --git a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item.tsx b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item.tsx
index 5f14c4ba..dd6dc21f 100644
--- a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item.tsx
+++ b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list-item/relationship-list-item.tsx
@@ -20,11 +20,11 @@ export const RelationshipListItem = React.forwardRef<
<AccordionItem value={relationship.id} className="rounded-md" ref={ref}>
<AccordionTrigger
asChild
- className="hover:no-underline hover:bg-accent rounded-md px-2 py-0 data-[state=open]:rounded-b-none w-full"
+ className="w-full rounded-md px-2 py-0 hover:bg-accent hover:no-underline data-[state=open]:rounded-b-none"
>
<RelationshipListItemHeader relationship={relationship} />
</AccordionTrigger>
- <AccordionContent className="pb-0 p-1">
+ <AccordionContent className="p-1 pb-0">
<RelationshipListItemContent relationship={relationship} />
</AccordionContent>
</AccordionItem>
diff --git a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list.tsx b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list.tsx
index 05341c4f..856e4f01 100644
--- a/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list.tsx
+++ b/src/pages/editor-page/side-panel/relationships-section/relationship-list/relationship-list.tsx
@@ -40,7 +40,7 @@ export const RelationshipList: React.FC<TableListProps> = ({
<Accordion
type="single"
collapsible
- className="flex flex-col w-full gap-1"
+ className="flex w-full flex-col gap-1"
value={openedRelationshipInSidebar}
onValueChange={openRelationshipFromSidebar}
>
diff --git a/src/pages/editor-page/side-panel/relationships-section/relationships-section.tsx b/src/pages/editor-page/side-panel/relationships-section/relationships-section.tsx
index 84a9097e..4057c171 100644
--- a/src/pages/editor-page/side-panel/relationships-section/relationships-section.tsx
+++ b/src/pages/editor-page/side-panel/relationships-section/relationships-section.tsx
@@ -27,28 +27,28 @@ export const RelationshipsSection: React.FC<RelationshipsSectionProps> = () => {
}, [relationships, filterText]);
return (
- <section className="flex flex-col px-2 overflow-hidden flex-1">
- <div className="flex items-center py-1 justify-between gap-4">
+ <section className="flex flex-1 flex-col overflow-hidden px-2">
+ <div className="flex items-center justify-between gap-4 py-1">
<div>
<Button
variant="ghost"
- className="p-0 h-8 w-8"
+ className="size-8 p-0"
onClick={closeAllRelationshipsInSidebar}
>
- <ListCollapse className="w-4 h-4" />
+ <ListCollapse className="size-4" />
</Button>
</div>
<div className="flex-1">
<Input
type="text"
placeholder="Filter"
- className="h-8 focus-visible:ring-0 w-full"
+ className="h-8 w-full focus-visible:ring-0"
value={filterText}
onChange={(e) => setFilterText(e.target.value)}
/>
</div>
</div>
- <div className="flex flex-col flex-1 overflow-hidden">
+ <div className="flex flex-1 flex-col overflow-hidden">
<ScrollArea className="h-full">
{relationships.length === 0 ? (
<EmptyState
diff --git a/src/pages/editor-page/side-panel/side-panel.tsx b/src/pages/editor-page/side-panel/side-panel.tsx
index 20a0c5c4..20c7d687 100644
--- a/src/pages/editor-page/side-panel/side-panel.tsx
+++ b/src/pages/editor-page/side-panel/side-panel.tsx
@@ -26,7 +26,7 @@ export const SidePanel: React.FC<SidePanelProps> = () => {
selectSidebarSection(value as SidebarSection)
}
>
- <SelectTrigger className="border-none rounded-none shadow-none focus:border-transparent focus:ring-0 hover:underline hover:bg-secondary font-semibold">
+ <SelectTrigger className="rounded-none border-none font-semibold shadow-none hover:bg-secondary hover:underline focus:border-transparent focus:ring-0">
<SelectValue />
</SelectTrigger>
<SelectContent>
diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-field/table-field.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-field/table-field.tsx
index d8f73e3d..af9c0fa1 100644
--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-field/table-field.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-field/table-field.tsx
@@ -42,13 +42,13 @@ export const TableField: React.FC<TableFieldProps> = ({
}));
return (
- <div className="flex flex-row p-1 justify-between flex-1">
- <div className="flex w-8/12 gap-1 justify-start overflow-hidden">
+ <div className="flex flex-1 flex-row justify-between p-1">
+ <div className="flex w-8/12 justify-start gap-1 overflow-hidden">
<Tooltip>
<TooltipTrigger asChild>
<span className="w-7/12">
<Input
- className="h-8 focus-visible:ring-0 w-full !overflow-hidden !whitespace-nowrap !text-ellipsis"
+ className="h-8 w-full !truncate focus-visible:ring-0"
type="text"
placeholder="Name"
value={field.name}
@@ -85,13 +85,13 @@ export const TableField: React.FC<TableFieldProps> = ({
<TooltipContent>{field.type.name}</TooltipContent>
</Tooltip>
</div>
- <div className="flex w-4/12 gap-1 justify-end overflow-hidden">
+ <div className="flex w-4/12 justify-end gap-1 overflow-hidden">
<Tooltip>
<TooltipTrigger asChild>
<span>
<Toggle
variant="default"
- className="hover:bg-primary-foreground p-2 w-[32px] text-slate-500 hover:text-slate-700 text-xs h-8"
+ className="h-8 w-[32px] p-2 text-xs text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
pressed={field.nullable}
onPressedChange={(value) =>
updateField({
@@ -110,7 +110,7 @@ export const TableField: React.FC<TableFieldProps> = ({
<span>
<Toggle
variant="default"
- className="hover:bg-primary-foreground p-2 w-[32px] text-slate-500 hover:text-slate-700 h-8"
+ className="h-8 w-[32px] p-2 text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
pressed={field.primaryKey}
onPressedChange={(value) =>
updateField({
@@ -129,18 +129,18 @@ export const TableField: React.FC<TableFieldProps> = ({
<PopoverTrigger asChild>
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-2 w-[32px] text-slate-500 hover:text-slate-700 h-8"
+ className="h-8 w-[32px] p-2 text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
>
- <Ellipsis className="h-3.5 w-3.5" />
+ <Ellipsis className="size-3.5" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-52">
- <div className="flex gap-2 flex-col">
+ <div className="flex flex-col gap-2">
<div className="text-sm font-semibold">
Field Attributes
</div>
<Separator orientation="horizontal" />
- <div className="flex justify-between items-center">
+ <div className="flex items-center justify-between">
<Label
htmlFor="width"
className="text-gray-700"
@@ -160,10 +160,10 @@ export const TableField: React.FC<TableFieldProps> = ({
<Separator orientation="horizontal" />
<Button
variant="outline"
- className="flex !text-red-700 gap-2"
+ className="flex gap-2 !text-red-700"
onClick={removeField}
>
- <Trash2 className="text-red-700 w-3.5 h-3.5" />
+ <Trash2 className="size-3.5 text-red-700" />
Delete field
</Button>
</div>
diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx
index a27d94c9..121c53d6 100644
--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-index/table-index.tsx
@@ -36,7 +36,7 @@ export const TableIndex: React.FC<TableIndexProps> = ({
updateIndex({ fieldIds: ids });
};
return (
- <div className="flex flex-row p-1 justify-between flex-1 gap-2">
+ <div className="flex flex-1 flex-row justify-between gap-2 p-1">
<Combobox
className="flex h-8 flex-1"
popoverClassName="w-48"
@@ -52,13 +52,13 @@ export const TableIndex: React.FC<TableIndexProps> = ({
<PopoverTrigger asChild>
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-2 w-[32px] text-slate-500 hover:text-slate-700 h-8"
+ className="h-8 w-[32px] p-2 text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
>
- <Ellipsis className="h-3.5 w-3.5" />
+ <Ellipsis className="size-3.5" />
</Button>
</PopoverTrigger>
<PopoverContent className="w-52">
- <div className="flex gap-2 flex-col">
+ <div className="flex flex-col gap-2">
<div className="text-sm font-semibold">
Index Attributes
</div>
@@ -79,7 +79,7 @@ export const TableIndex: React.FC<TableIndexProps> = ({
}
/>
</div>
- <div className="flex justify-between items-center mt-2">
+ <div className="mt-2 flex items-center justify-between">
<Label
htmlFor="width"
className="text-gray-700"
@@ -98,10 +98,10 @@ export const TableIndex: React.FC<TableIndexProps> = ({
<Separator orientation="horizontal" />
<Button
variant="outline"
- className="flex !text-red-700 gap-2"
+ className="flex gap-2 !text-red-700"
onClick={removeIndex}
>
- <Trash2 className="text-red-700 w-3.5 h-3.5" />
+ <Trash2 className="size-3.5 text-red-700" />
Delete index
</Button>
</div>
diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-list-item-content.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-list-item-content.tsx
index bf02b7e8..e6a22cb0 100644
--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-list-item-content.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-content/table-list-item-content.tsx
@@ -51,7 +51,7 @@ export const TableListItemContent: React.FC<TableListItemContentProps> = ({
return (
<div
- className="border-l-[6px] rounded-b-md px-1 flex flex-col gap-1"
+ className="flex flex-col gap-1 rounded-b-md border-l-[6px] px-1"
style={{
borderColor: color,
}}
@@ -64,28 +64,28 @@ export const TableListItemContent: React.FC<TableListItemContentProps> = ({
setSelectedItems(value as AccordionItemValue[])
}
>
- <AccordionItem value="fields" className="border-y-0 mb-2">
+ <AccordionItem value="fields" className="mb-2 border-y-0">
<AccordionTrigger
iconPosition="right"
- className="p-0 px-2 text-xs text-slate-600 flex flex-1 hover:bg-secondary py-1 group"
+ className="group flex flex-1 p-0 px-2 py-1 text-xs text-slate-600 hover:bg-secondary"
asChild
>
- <div className="flex items-center justify-between flex-1">
+ <div className="flex flex-1 items-center justify-between">
<div className="flex flex-row items-center gap-1">
- <FileType2 className="h-4 w-4" />
+ <FileType2 className="size-4" />
Fields
</div>
<div className="flex flex-row-reverse">
- <div className="hidden group-hover:flex flex-row-reverse">
+ <div className="hidden flex-row-reverse group-hover:flex">
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-0 h-4 w-4 text-slate-500 hover:text-slate-700 text-xs"
+ className="size-4 p-0 text-xs text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
onClick={(e) => {
e.stopPropagation();
createField(table.id);
}}
>
- <Plus className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
+ <Plus className="size-4 shrink-0 text-muted-foreground transition-transform duration-200" />
</Button>
</div>
</div>
@@ -110,25 +110,25 @@ export const TableListItemContent: React.FC<TableListItemContentProps> = ({
<AccordionItem value="indexes" className="border-y-0">
<AccordionTrigger
iconPosition="right"
- className="p-0 px-2 text-xs text-slate-600 flex flex-1 hover:bg-secondary py-1 group"
+ className="group flex flex-1 p-0 px-2 py-1 text-xs text-slate-600 hover:bg-secondary"
asChild
>
- <div className="flex items-center justify-between flex-1">
+ <div className="flex flex-1 items-center justify-between">
<div className="flex flex-row items-center gap-1">
- <FileKey2 className="h-4 w-4" />
+ <FileKey2 className="size-4" />
Indexes
</div>
<div className="flex flex-row-reverse">
- <div className="hidden group-hover:flex flex-row-reverse">
+ <div className="hidden flex-row-reverse group-hover:flex">
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-0 h-4 w-4 text-slate-500 hover:text-slate-700 text-xs"
+ className="size-4 p-0 text-xs text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
onClick={(e) => {
e.stopPropagation();
createIndexHandler();
}}
>
- <Plus className="h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-200" />
+ <Plus className="size-4 shrink-0 text-muted-foreground transition-transform duration-200" />
</Button>
</div>
</div>
@@ -152,11 +152,11 @@ export const TableListItemContent: React.FC<TableListItemContentProps> = ({
</AccordionItem>
</Accordion>
<Separator className="" />
- <div className="flex items-center justify-between flex-1">
+ <div className="flex flex-1 items-center justify-between">
<div>
<Button
variant="outline"
- className="text-xs h-8 p-2"
+ className="h-8 p-2 text-xs"
onClick={createIndexHandler}
>
<FileKey2 className="h-4" />
@@ -166,7 +166,7 @@ export const TableListItemContent: React.FC<TableListItemContentProps> = ({
<div>
<Button
variant="outline"
- className="text-xs h-8 p-2"
+ className="h-8 p-2 text-xs"
onClick={() => createField(table.id)}
>
<FileType2 className="h-4" />
diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-header/table-list-item-header.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-header/table-list-item-header.tsx
index 6dcad8db..fce02334 100644
--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-header/table-list-item-header.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item-header/table-list-item-header.tsx
@@ -118,7 +118,7 @@ export const TableListItemHeader: React.FC<TableListItemHeaderProps> = ({
}}
>
Add field
- <FileType2 className="w-3.5 h-3.5" />
+ <FileType2 className="size-3.5" />
</DropdownMenuItem>
<DropdownMenuItem
className="flex justify-between"
@@ -128,7 +128,7 @@ export const TableListItemHeader: React.FC<TableListItemHeaderProps> = ({
}}
>
Add index
- <FileKey2 className="w-3.5 h-3.5" />
+ <FileKey2 className="size-3.5" />
</DropdownMenuItem>
</DropdownMenuGroup>
<DropdownMenuSeparator />
@@ -138,7 +138,7 @@ export const TableListItemHeader: React.FC<TableListItemHeaderProps> = ({
className="flex justify-between !text-red-700"
>
Delete table
- <Trash2 className="text-red-700 w-3.5 h-3.5" />
+ <Trash2 className="size-3.5 text-red-700" />
</DropdownMenuItem>
</DropdownMenuGroup>
</DropdownMenuContent>
@@ -148,8 +148,8 @@ export const TableListItemHeader: React.FC<TableListItemHeaderProps> = ({
);
return (
- <div className="h-11 flex items-center justify-between flex-1 gap-1 group overflow-hidden">
- <div className="flex flex-1 min-w-0">
+ <div className="group flex h-11 flex-1 items-center justify-between gap-1 overflow-hidden">
+ <div className="flex min-w-0 flex-1">
{editMode ? (
<Input
ref={inputRef}
@@ -159,7 +159,7 @@ export const TableListItemHeader: React.FC<TableListItemHeaderProps> = ({
value={tableName}
onClick={(e) => e.stopPropagation()}
onChange={(e) => setTableName(e.target.value)}
- className="h-7 focus-visible:ring-0 w-full"
+ className="h-7 w-full focus-visible:ring-0"
/>
) : (
<div className="truncate">{table.name}</div>
@@ -169,7 +169,7 @@ export const TableListItemHeader: React.FC<TableListItemHeaderProps> = ({
{!editMode ? (
<>
<div>{renderDropDownMenu()}</div>
- <div className="flex md:hidden md:group-hover:flex flex-row-reverse">
+ <div className="flex flex-row-reverse md:hidden md:group-hover:flex">
<ListItemHeaderButton onClick={enterEditMode}>
<Pencil />
</ListItemHeaderButton>
diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item.tsx
index 44a8647f..8cadcaf0 100644
--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list-item/table-list-item.tsx
@@ -19,7 +19,7 @@ export const TableListItem = React.forwardRef<
return (
<AccordionItem value={table.id} className="rounded-md" ref={ref}>
<AccordionTrigger
- className="hover:no-underline hover:bg-accent rounded-md px-2 border-l-[6px] py-0 data-[state=open]:rounded-b-none w-full"
+ className="w-full rounded-md border-l-[6px] px-2 py-0 hover:bg-accent hover:no-underline data-[state=open]:rounded-b-none"
style={{
borderColor: table.color,
}}
diff --git a/src/pages/editor-page/side-panel/tables-section/table-list/table-list.tsx b/src/pages/editor-page/side-panel/tables-section/table-list/table-list.tsx
index 72c8ea3d..fc3786dc 100644
--- a/src/pages/editor-page/side-panel/tables-section/table-list/table-list.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/table-list/table-list.tsx
@@ -37,7 +37,7 @@ export const TableList: React.FC<TableListProps> = ({ tables }) => {
<Accordion
type="single"
collapsible
- className="flex flex-col w-full gap-1"
+ className="flex w-full flex-col gap-1"
value={openedTableInSidebar}
onValueChange={openTableFromSidebar}
>
diff --git a/src/pages/editor-page/side-panel/tables-section/tables-section.tsx b/src/pages/editor-page/side-panel/tables-section/tables-section.tsx
index 0bf37c2e..93ab1701 100644
--- a/src/pages/editor-page/side-panel/tables-section/tables-section.tsx
+++ b/src/pages/editor-page/side-panel/tables-section/tables-section.tsx
@@ -26,36 +26,36 @@ export const TablesSection: React.FC<TablesSectionProps> = () => {
}, [tables, filterText]);
return (
- <section className="flex flex-col px-2 overflow-hidden flex-1">
- <div className="flex items-center py-1 justify-between gap-4">
+ <section className="flex flex-1 flex-col overflow-hidden px-2">
+ <div className="flex items-center justify-between gap-4 py-1">
<div>
<Button
variant="ghost"
- className="p-0 h-8 w-8"
+ className="size-8 p-0"
onClick={closeAllTablesInSidebar}
>
- <ListCollapse className="w-4 h-4" />
+ <ListCollapse className="size-4" />
</Button>
</div>
<div className="flex-1">
<Input
type="text"
placeholder="Filter"
- className="h-8 focus-visible:ring-0 w-full"
+ className="h-8 w-full focus-visible:ring-0"
value={filterText}
onChange={(e) => setFilterText(e.target.value)}
/>
</div>
<Button
variant="secondary"
- className="text-xs h-8 p-2"
+ className="h-8 p-2 text-xs"
onClick={createTable}
>
<Table className="h-4" />
Add Table
</Button>
</div>
- <div className="flex flex-col flex-1 overflow-hidden">
+ <div className="flex flex-1 flex-col overflow-hidden">
<ScrollArea className="h-full">
{tables.length === 0 ? (
<EmptyState
diff --git a/src/pages/editor-page/top-navbar/top-navbar.tsx b/src/pages/editor-page/top-navbar/top-navbar.tsx
index 02f13e2a..7cb3f5b0 100644
--- a/src/pages/editor-page/top-navbar/top-navbar.tsx
+++ b/src/pages/editor-page/top-navbar/top-navbar.tsx
@@ -132,7 +132,7 @@ export const TopNavbar: React.FC<TopNavbarProps> = () => {
showAlert({
title: 'Export SQL Limit Reached',
content: (
- <div className="flex text-sm gap-1 flex-col">
+ <div className="flex flex-col gap-1 text-sm">
<div>
We set a budget to allow the community to
check the feature. You have reached the
@@ -220,11 +220,11 @@ export const TopNavbar: React.FC<TopNavbarProps> = () => {
onChange={(e) =>
setEditedDiagramName(e.target.value)
}
- className="h-7 focus-visible:ring-0 ml-1"
+ className="ml-1 h-7 focus-visible:ring-0"
/>
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-2 w-7 h-7 text-slate-500 hover:text-slate-700 hidden group-hover:flex"
+ className="hidden size-7 p-2 text-slate-500 hover:bg-primary-foreground hover:text-slate-700 group-hover:flex"
onClick={editDiagramName}
>
<Check />
@@ -235,7 +235,7 @@ export const TopNavbar: React.FC<TopNavbarProps> = () => {
<Label>{diagramName}</Label>
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-2 w-7 h-7 text-slate-500 hover:text-slate-700 hidden group-hover:flex"
+ className="hidden size-7 p-2 text-slate-500 hover:bg-primary-foreground hover:text-slate-700 group-hover:flex"
onClick={enterEditMode}
>
<Pencil />
@@ -257,9 +257,9 @@ export const TopNavbar: React.FC<TopNavbarProps> = () => {
const emojiAI = '✨';
return (
- <nav className="flex flex-col md:flex-row items-top md:items-center justify-between px-4 h-20 md:h-12 border-b">
- <div className="flex flex-1 gap-x-3 justify-between md:justify-normal">
- <div className="flex font-primary items-top md:items-center py-[10px] md:py-0">
+ <nav className="flex h-20 flex-col justify-between border-b px-4 md:h-12 md:flex-row md:items-center">
+ <div className="flex flex-1 justify-between gap-x-3 md:justify-normal">
+ <div className="flex py-[10px] font-primary md:items-center md:py-0">
<a
href="https://chartdb.io"
className="cursor-pointer"
@@ -464,10 +464,10 @@ export const TopNavbar: React.FC<TopNavbarProps> = () => {
</div>
{isDesktop ? (
<>
- <div className="flex flex-row flex-1 justify-center items-center group">
+ <div className="group flex flex-1 flex-row items-center justify-center">
{renderDiagramName()}
</div>
- <div className="hidden flex-1 justify-end sm:flex items-center gap-2">
+ <div className="hidden flex-1 items-center justify-end gap-2 sm:flex">
{renderLastSaved()}
{renderStars()}
{/* {renderDarkModeToggle()} */}
@@ -478,10 +478,10 @@ export const TopNavbar: React.FC<TopNavbarProps> = () => {
<div className="flex justify-center">
{renderLastSaved()}
</div>
- <div className="flex flex-row flex-1 justify-center items-center group">
+ <div className="group flex flex-1 flex-row items-center justify-center">
{renderDiagramName()}
</div>
- <div className="flex justify-center items-center">
+ <div className="flex items-center justify-center">
{renderStars()}
</div>
{/* <div className="flex justify-center items-center">
diff --git a/src/pages/examples-page/example-card.tsx b/src/pages/examples-page/example-card.tsx
index 6b0fa05d..4a81716f 100644
--- a/src/pages/examples-page/example-card.tsx
+++ b/src/pages/examples-page/example-card.tsx
@@ -43,13 +43,13 @@ export const ExampleCard: React.FC<ExampleCardProps> = ({ example }) => {
return (
<div
onClick={utilizeExample}
- className="h-96 rounded-xl flex flex-col w-full bg-slate-50 border-2 border-slate-500 hover:border-pink-600 shadow-sm cursor-pointer transition ease-in-out duration-300 hover:scale-[102%]"
+ className="flex h-96 w-full cursor-pointer flex-col rounded-xl border-2 border-slate-500 bg-slate-50 shadow-sm transition duration-300 ease-in-out hover:scale-[102%] hover:border-pink-600"
>
<div
className="h-4 rounded-t-xl"
style={{ backgroundColor: randomColor() }}
></div>
- <div className="flex items-center h-12 bg-slate-200 px-2 justify-between">
+ <div className="flex h-12 items-center justify-between bg-slate-200 px-2">
<div className="flex items-center gap-2">
<Tooltip>
<TooltipTrigger className="mr-1">
@@ -71,17 +71,17 @@ export const ExampleCard: React.FC<ExampleCardProps> = ({ example }) => {
}
</TooltipContent>
</Tooltip>
- <Label className="text-md font-bold cursor-pointer">
+ <Label className="cursor-pointer text-base font-bold">
{example.name}
</Label>
</div>
- <div className="flex-row flex">
+ <div className="flex flex-row">
<Button
variant="ghost"
- className="hover:bg-primary-foreground p-0 w-9 h-9 text-slate-500 hover:text-slate-700"
+ className="size-9 p-0 text-slate-500 hover:bg-primary-foreground hover:text-slate-700"
// onClick={openTableInEditor}
>
- <Import className="h-5 w-5" />
+ <Import className="size-5" />
</Button>
</div>
</div>
@@ -90,7 +90,7 @@ export const ExampleCard: React.FC<ExampleCardProps> = ({ example }) => {
alt={example.name}
className="w-fit border-b"
/>
- <div className="flex p-2 text-md">{example.description}</div>
+ <div className="flex p-2 text-base">{example.description}</div>
</div>
);
};
diff --git a/src/pages/examples-page/examples-page.tsx b/src/pages/examples-page/examples-page.tsx
index 050fb29b..d53749df 100644
--- a/src/pages/examples-page/examples-page.tsx
+++ b/src/pages/examples-page/examples-page.tsx
@@ -5,10 +5,10 @@ import { ExampleCard } from './example-card';
export const ExamplesPage: React.FC = () => {
return (
- <section className="bg-background w-screen flex flex-col">
- <nav className="flex flex-row items-center justify-between px-4 h-12 border-b">
+ <section className="flex w-screen flex-col bg-background">
+ <nav className="flex h-12 flex-row items-center justify-between border-b px-4">
<div className="flex flex-1 justify-start gap-x-3">
- <div className="flex font-primary items-center">
+ <div className="flex items-center font-primary">
<a
href="https://chartdb.io"
className="cursor-pointer"
@@ -22,16 +22,16 @@ export const ExamplesPage: React.FC = () => {
</a>
</div>
</div>
- <div className="flex flex-row flex-1 justify-center items-center group"></div>
+ <div className="group flex flex-1 flex-row items-center justify-center"></div>
<div className="hidden flex-1 justify-end sm:flex"></div>
</nav>
<div className="flex flex-col px-3 pt-3 text-center md:px-28 md:text-left">
- <div className="text-2xl font-bold font-primary">Examples</div>
- <div className="text-md font-primary mt-1 text-muted-foreground">
+ <div className="font-primary text-2xl font-bold">Examples</div>
+ <div className="mt-1 font-primary text-base text-muted-foreground">
A collection of examples to help you get started with
ChartDB.
</div>
- <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 grid-flow-row gap-6 mt-6">
+ <div className="mt-6 grid grid-flow-row grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
{examples.map((example) => (
<ExampleCard key={example.id} example={example} />
))}
diff --git a/src/pages/not-found-page/not-found-page.tsx b/src/pages/not-found-page/not-found-page.tsx
index 35e82fdb..4bdbe6a7 100644
--- a/src/pages/not-found-page/not-found-page.tsx
+++ b/src/pages/not-found-page/not-found-page.tsx
@@ -3,12 +3,12 @@ import React from 'react';
export const NotFoundPage: React.FC = () => {
return (
<section className="bg-white">
- <div className="py-8 px-4 mx-auto max-w-screen-xl lg:py-16 lg:px-6">
+ <div className="mx-auto max-w-screen-xl px-4 py-8 lg:px-6 lg:py-16">
<div className="mx-auto max-w-screen-sm text-center">
- <h1 className="mb-4 text-7xl tracking-tight font-extrabold lg:text-9xl text-primary-600">
+ <h1 className="mb-4 text-7xl font-extrabold tracking-tight text-primary lg:text-9xl">
404
</h1>
- <p className="mb-4 text-3xl tracking-tight font-bold text-gray-900 md:text-4xl">
+ <p className="mb-4 text-3xl font-bold tracking-tight text-gray-900 md:text-4xl">
Something's missing.
</p>
<p className="mb-4 text-lg font-light text-gray-500">