From 10b6fb6d47383646a9459090b3c4de0ddc2bfeac Mon Sep 17 00:00:00 2001 From: gmolki Date: Fri, 19 Apr 2024 12:24:37 +0200 Subject: [PATCH] fix: naming of responsiveTypo texts field --- src/components/H1/cmp.tsx | 4 ++-- src/components/H2/cmp.tsx | 4 ++-- src/components/Text/cmp.tsx | 6 ++---- src/components/TextGradient/cmp.builder.tsx | 5 ----- src/components/TextGradient/cmp.tsx | 4 ++-- src/components/TextGradient/types.ts | 3 +-- src/types/TextProps.tsx | 2 +- 7 files changed, 10 insertions(+), 18 deletions(-) diff --git a/src/components/H1/cmp.tsx b/src/components/H1/cmp.tsx index 7733f03..35f52df 100644 --- a/src/components/H1/cmp.tsx +++ b/src/components/H1/cmp.tsx @@ -5,13 +5,13 @@ import { H1Props } from "./types"; export const H1 = ({ children, responsiveTextType, - responsiveType, + responsiveTypo, responsiveFontSize, ...rest }: H1Props) => { const classNames = [ calculateResponsiveClassNames(responsiveTextType), - calculateResponsiveClassNames(responsiveType), + calculateResponsiveClassNames(responsiveTypo), calculateResponsiveClassNames(responsiveFontSize), ].join(" "); diff --git a/src/components/H2/cmp.tsx b/src/components/H2/cmp.tsx index e7b8e95..24facbe 100644 --- a/src/components/H2/cmp.tsx +++ b/src/components/H2/cmp.tsx @@ -5,13 +5,13 @@ import { H2Props } from "./types"; export const H2 = ({ children, responsiveTextType, - responsiveType, + responsiveTypo, responsiveFontSize, ...rest }: H2Props) => { const classNames = [ calculateResponsiveClassNames(responsiveTextType), - calculateResponsiveClassNames(responsiveType), + calculateResponsiveClassNames(responsiveTypo), calculateResponsiveClassNames(responsiveFontSize), ].join(" "); diff --git a/src/components/Text/cmp.tsx b/src/components/Text/cmp.tsx index 2ef349e..50cafc9 100644 --- a/src/components/Text/cmp.tsx +++ b/src/components/Text/cmp.tsx @@ -7,17 +7,15 @@ import { calculateResponsiveClassNames } from "@/utils/responsiveClassNames"; export const Text = ({ children, responsiveTextType, - responsiveType, + responsiveTypo, responsiveFontSize, }: TextProps) => { const classNames = [ calculateResponsiveClassNames(responsiveTextType), - calculateResponsiveClassNames(responsiveType), + calculateResponsiveClassNames(responsiveTypo), calculateResponsiveClassNames(responsiveFontSize), ].join(" "); - console.log(classNames); - return

{children}

; }; diff --git a/src/components/TextGradient/cmp.builder.tsx b/src/components/TextGradient/cmp.builder.tsx index e1804de..c0c8cdb 100644 --- a/src/components/TextGradient/cmp.builder.tsx +++ b/src/components/TextGradient/cmp.builder.tsx @@ -19,10 +19,5 @@ Builder.registerComponent(TextGradient, { type: "string", enum: ["", "h1", "h2", "h3"], }, - { - name: "size", - hideFromUI: true, - type: "number", - }, ], }); diff --git a/src/components/TextGradient/cmp.tsx b/src/components/TextGradient/cmp.tsx index 1d48142..b9d259b 100644 --- a/src/components/TextGradient/cmp.tsx +++ b/src/components/TextGradient/cmp.tsx @@ -8,13 +8,13 @@ import { calculateResponsiveClassNames } from "@/utils/responsiveClassNames"; export const TextGradient = ({ children, responsiveTextType, - responsiveType, + responsiveTypo, responsiveFontSize, ...rest }: TextGradientProps) => { const classNames = [ calculateResponsiveClassNames(responsiveTextType), - calculateResponsiveClassNames(responsiveType), + calculateResponsiveClassNames(responsiveTypo), calculateResponsiveClassNames(responsiveFontSize), ].join(" "); diff --git a/src/components/TextGradient/types.ts b/src/components/TextGradient/types.ts index 7ba9765..c63b410 100644 --- a/src/components/TextGradient/types.ts +++ b/src/components/TextGradient/types.ts @@ -1,4 +1,3 @@ import { TextProps } from "@/types/TextProps"; -import { TextGradientProps as CoreTextGradientProps } from "@aleph-front/core"; -export type TextGradientProps = CoreTextGradientProps & TextProps; +export type TextGradientProps = TextProps; diff --git a/src/types/TextProps.tsx b/src/types/TextProps.tsx index 9118dfc..527f37e 100644 --- a/src/types/TextProps.tsx +++ b/src/types/TextProps.tsx @@ -3,6 +3,6 @@ import { ClassBreakpoint } from "./breakpoints"; export type TextProps = { children: React.ReactNode; responsiveTextType: ClassBreakpoint[]; - responsiveType: ClassBreakpoint[]; + responsiveTypo: ClassBreakpoint[]; responsiveFontSize: ClassBreakpoint[]; };