From 2c735d7edf8f80430c2fbacd62d502e9b2924595 Mon Sep 17 00:00:00 2001 From: Ahmed Bouhuolia Date: Sun, 13 Oct 2024 21:14:18 +0200 Subject: [PATCH] feat: Add customize templates button to edit forms --- .../src/components/PageForm/PageForm.tsx | 2 +- .../BrandingTemplatesSelectFields.tsx | 48 +++++++------------ .../PaymentMethods/StripePaymentMethod.tsx | 2 +- .../CreditNoteFloatingActions.tsx | 31 +++++++++++- .../EstimateForm/EstimateFloatingActions.tsx | 31 +++++++++++- .../InvoiceForm/InvoiceFloatingActions.tsx | 32 ++++++++++++- .../PaymentReceiveFloatingActions.tsx | 34 ++++++++++++- .../ReceiptFormFloatingActions.tsx | 32 ++++++++++++- packages/webapp/src/icons/More.tsx | 6 +-- 9 files changed, 176 insertions(+), 42 deletions(-) diff --git a/packages/webapp/src/components/PageForm/PageForm.tsx b/packages/webapp/src/components/PageForm/PageForm.tsx index 7d173359d..cc58a57f8 100644 --- a/packages/webapp/src/components/PageForm/PageForm.tsx +++ b/packages/webapp/src/components/PageForm/PageForm.tsx @@ -50,7 +50,7 @@ PageFormFooter.displayName = 'PageFormFooter'; const footerActionsStyle = ` width: 100%; background: #fff; - padding: 14px 18px; + padding: 14px 20px; border-top: 1px solid rgb(210, 221, 226); box-shadow: 0px -1px 4px 0px rgba(0, 0, 0, 0.05); diff --git a/packages/webapp/src/containers/BrandingTemplates/BrandingTemplatesSelectFields.tsx b/packages/webapp/src/containers/BrandingTemplates/BrandingTemplatesSelectFields.tsx index 34b0ada06..501320fb6 100644 --- a/packages/webapp/src/containers/BrandingTemplates/BrandingTemplatesSelectFields.tsx +++ b/packages/webapp/src/containers/BrandingTemplates/BrandingTemplatesSelectFields.tsx @@ -1,6 +1,6 @@ -import { Button } from '@blueprintjs/core'; +import { Button, ButtonProps } from '@blueprintjs/core'; import styled from 'styled-components'; -import { FFormGroup } from '@/components'; +import { FFormGroup, Icon } from '@/components'; export const BrandingThemeFormGroup = styled(FFormGroup)` margin-bottom: 0; @@ -14,33 +14,21 @@ export const BrandingThemeFormGroup = styled(FFormGroup)` } `; -export const BrandingThemeSelectButton = styled(Button)` - position: relative; - padding-right: 26px; +export const BrandingThemeSelectButton = (props: ButtonProps) => { + return ( +