Skip to content

Commit

Permalink
fix: naming of responsiveTypo texts field
Browse files Browse the repository at this point in the history
  • Loading branch information
gmolki committed Apr 19, 2024
1 parent 49f291a commit 10b6fb6
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/components/H1/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ");

Expand Down
4 changes: 2 additions & 2 deletions src/components/H2/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ");

Expand Down
6 changes: 2 additions & 4 deletions src/components/Text/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 <p className={classNames}>{children}</p>;
};

Expand Down
5 changes: 0 additions & 5 deletions src/components/TextGradient/cmp.builder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,5 @@ Builder.registerComponent(TextGradient, {
type: "string",
enum: ["", "h1", "h2", "h3"],
},
{
name: "size",
hideFromUI: true,
type: "number",
},
],
});
4 changes: 2 additions & 2 deletions src/components/TextGradient/cmp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(" ");

Expand Down
3 changes: 1 addition & 2 deletions src/components/TextGradient/types.ts
Original file line number Diff line number Diff line change
@@ -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;
2 changes: 1 addition & 1 deletion src/types/TextProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import { ClassBreakpoint } from "./breakpoints";
export type TextProps = {
children: React.ReactNode;
responsiveTextType: ClassBreakpoint[];
responsiveType: ClassBreakpoint[];
responsiveTypo: ClassBreakpoint[];
responsiveFontSize: ClassBreakpoint[];
};

0 comments on commit 10b6fb6

Please sign in to comment.