Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Fix form toolbar background on dark layout

François Zaninotto4ebf4891b634
diff --git a/src/components/atomic-crm/companies/CompanyCreate.tsx b/src/components/atomic-crm/companies/CompanyCreate.tsx
index b2b35084..ab01c4cb 100644
--- a/src/components/atomic-crm/companies/CompanyCreate.tsx
+++ b/src/components/atomic-crm/companies/CompanyCreate.tsx
@@ -2,7 +2,6 @@ import { CreateBase, Form, useGetIdentity } from "ra-core";
import { Card, CardContent } from "@/components/ui/card";
import { CancelButton } from "@/components/admin/cancel-button";
import { SaveButton } from "@/components/admin/form";
-import { FormToolbar } from "@/components/admin/simple-form";
import { CompanyInputs } from "./CompanyInputs";
@@ -25,12 +24,13 @@ export const CompanyCreate = () => {
<Card>
<CardContent>
<CompanyInputs />
- <FormToolbar>
- <div className="flex flex-row gap-2 justify-end">
- <CancelButton />
- <SaveButton label="Create Company" />
- </div>
- </FormToolbar>
+ <div
+ role="toolbar"
+ className="sticky flex pt-4 pb-4 md:pb-0 bottom-0 bg-linear-to-b from-transparent to-card to-10% flex-row justify-end gap-2"
+ >
+ <CancelButton />
+ <SaveButton label="Create Company" />
+ </div>
</CardContent>
</Card>
</Form>
diff --git a/src/components/atomic-crm/contacts/ContactCreate.tsx b/src/components/atomic-crm/contacts/ContactCreate.tsx
index c26031f8..ecbeff76 100644
--- a/src/components/atomic-crm/contacts/ContactCreate.tsx
+++ b/src/components/atomic-crm/contacts/ContactCreate.tsx
@@ -1,9 +1,9 @@
import { CreateBase, Form, useGetIdentity } from "ra-core";
-import { FormToolbar } from "@/components/admin/simple-form";
import { Card, CardContent } from "@/components/ui/card";
import type { Contact } from "../types";
import { ContactInputs } from "./ContactInputs";
+import { FormToolbar } from "../layout/FormToolbar";
export const ContactCreate = () => {
const { identity } = useGetIdentity();