From c5852023a13f12f1d583c8dfd33561ed4a594091 Mon Sep 17 00:00:00 2001 From: rishabhrathod01 Date: Wed, 2 Oct 2024 01:10:53 +0530 Subject: [PATCH 1/3] fix: remove console errors on dev --- app/client/src/widgets/BaseInputWidget/component/index.tsx | 1 + app/client/src/widgets/ButtonWidget/component/index.tsx | 5 +++++ app/client/src/widgets/ContainerWidget/widget/index.tsx | 6 +++++- app/client/src/widgets/IconButtonWidget/component/index.tsx | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/client/src/widgets/BaseInputWidget/component/index.tsx b/app/client/src/widgets/BaseInputWidget/component/index.tsx index cbb7b21599a1..0ee121ca3f9f 100644 --- a/app/client/src/widgets/BaseInputWidget/component/index.tsx +++ b/app/client/src/widgets/BaseInputWidget/component/index.tsx @@ -60,6 +60,7 @@ const InputComponentWrapper = styled((props) => ( "boxShadow", "accentColor", "isDynamicHeightEnabled", + "isMultiLine", ])} /> ))<{ diff --git a/app/client/src/widgets/ButtonWidget/component/index.tsx b/app/client/src/widgets/ButtonWidget/component/index.tsx index 27f2377727f0..78aed49a1089 100644 --- a/app/client/src/widgets/ButtonWidget/component/index.tsx +++ b/app/client/src/widgets/ButtonWidget/component/index.tsx @@ -154,6 +154,11 @@ export const StyledButton = styled((props) => ( "boxShadowColor", "buttonColor", "buttonVariant", + "primaryColor", + "navColorStyle", + "varient", + "insideSidebar", + "isMinimal", ])} /> ))` diff --git a/app/client/src/widgets/ContainerWidget/widget/index.tsx b/app/client/src/widgets/ContainerWidget/widget/index.tsx index 4494b2bfa74d..39652fd7d433 100644 --- a/app/client/src/widgets/ContainerWidget/widget/index.tsx +++ b/app/client/src/widgets/ContainerWidget/widget/index.tsx @@ -385,7 +385,11 @@ export class ContainerWidget extends BaseWidget< this.props.positioning !== Positioning.Vertical; return ( - + ( "dimension", "hasOnClickAction", "compactMode", + "buttonColor", + "primaryColor", + "navColorStyle", + "isMinimal", + "insideSidebar", ])} /> ))` From 6cd9efb6a6b9f95ac66ea215ad3452b386fe0ae3 Mon Sep 17 00:00:00 2001 From: rishabhrathod01 Date: Wed, 2 Oct 2024 11:25:59 +0530 Subject: [PATCH 2/3] fix wrong spelled prop `varient` --- app/client/src/pages/AppViewer/AppViewerButton.tsx | 6 +++--- app/client/src/pages/AppViewer/PrimaryCTA.tsx | 6 +++--- app/client/src/widgets/WidgetUtils.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/client/src/pages/AppViewer/AppViewerButton.tsx b/app/client/src/pages/AppViewer/AppViewerButton.tsx index 42c2af78eaa9..8fb4c134e3a9 100644 --- a/app/client/src/pages/AppViewer/AppViewerButton.tsx +++ b/app/client/src/pages/AppViewer/AppViewerButton.tsx @@ -14,7 +14,7 @@ import { getTypographyByKey } from "@appsmith/ads-old"; const StyledButton = styled(Button)<{ primaryColor: string; navColorStyle: NavigationSetting["colorStyle"]; - varient?: ButtonVariant; + variant?: ButtonVariant; insideSidebar?: boolean; isMinimal?: boolean; }>` @@ -87,7 +87,7 @@ const StyledButton = styled(Button)<{ }} // Secondary button styles (such as the sign in button) - ${({ insideSidebar = false, navColorStyle, primaryColor, varient }) => { + ${({ insideSidebar = false, navColorStyle, primaryColor, variant }) => { const styles = getSignInButtonStyles(primaryColor, navColorStyle); let secondaryVarientStyles = ` @@ -123,7 +123,7 @@ const StyledButton = styled(Button)<{ `; } - return varient === ButtonVariantTypes.SECONDARY + return variant === ButtonVariantTypes.SECONDARY ? secondaryVarientStyles : ""; }} diff --git a/app/client/src/pages/AppViewer/PrimaryCTA.tsx b/app/client/src/pages/AppViewer/PrimaryCTA.tsx index 5153588a2b20..9e2816166454 100644 --- a/app/client/src/pages/AppViewer/PrimaryCTA.tsx +++ b/app/client/src/pages/AppViewer/PrimaryCTA.tsx @@ -198,7 +198,7 @@ function PrimaryCTA(props: Props) { }} primaryColor={primaryColor} text={createMessage(FORK_APP)} - varient={ButtonVariantTypes.SECONDARY} + variant={ButtonVariantTypes.SECONDARY} /> ); } @@ -220,7 +220,7 @@ function PrimaryCTA(props: Props) { }} primaryColor={primaryColor} text={createMessage(FORK_APP)} - varient={ButtonVariantTypes.SECONDARY} + variant={ButtonVariantTypes.SECONDARY} /> ); } diff --git a/app/client/src/widgets/WidgetUtils.ts b/app/client/src/widgets/WidgetUtils.ts index 8a0a7c33e2f4..5184b0c73d2a 100644 --- a/app/client/src/widgets/WidgetUtils.ts +++ b/app/client/src/widgets/WidgetUtils.ts @@ -166,12 +166,12 @@ export const getCustomHoverColor = ( * Calculate Hover Color using the logic * https://www.notion.so/appsmith/Widget-hover-colors-165e54b304ca4e83a355e4e14d7aa3cb * - * In case of transparent backgrounds (secondary or tertiary button varients) + * In case of transparent backgrounds (secondary or tertiary button variants) * 1. Find out the button color * 2. Calculate hover color by setting the button color to 10% transparency * 3. Add the calculated color to the background of the button * - * In case of non transparent backgrounds (primary button varient), using the HSL color modal, + * In case of non transparent backgrounds (primary button variant), using the HSL color modal, * 1. If lightness > 35, decrease the lightness by 5 on hover * 2. If lightness <= 35, increase the lightness by 5 on hover * From 49353f7be46bbb5ec9c581ed6a0adf975f65d32e Mon Sep 17 00:00:00 2001 From: rishabhrathod01 Date: Wed, 2 Oct 2024 11:45:43 +0530 Subject: [PATCH 3/3] fix the spelling of prop `varient` --- app/client/src/widgets/ButtonWidget/component/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/client/src/widgets/ButtonWidget/component/index.tsx b/app/client/src/widgets/ButtonWidget/component/index.tsx index 78aed49a1089..6d1a1eed5607 100644 --- a/app/client/src/widgets/ButtonWidget/component/index.tsx +++ b/app/client/src/widgets/ButtonWidget/component/index.tsx @@ -156,7 +156,7 @@ export const StyledButton = styled((props) => ( "buttonVariant", "primaryColor", "navColorStyle", - "varient", + "variant", "insideSidebar", "isMinimal", ])}