{children}
; +}; + +export default Text; diff --git a/src/components/Text/index.tsx b/src/components/Text/index.tsx new file mode 100644 index 0000000..a05ebc5 --- /dev/null +++ b/src/components/Text/index.tsx @@ -0,0 +1 @@ +export { default } from "./cmp"; diff --git a/src/components/TextGradient/cmp.builder.tsx b/src/components/TextGradient/cmp.builder.tsx new file mode 100644 index 0000000..a440840 --- /dev/null +++ b/src/components/TextGradient/cmp.builder.tsx @@ -0,0 +1,33 @@ +import { Builder, withChildren } from "@builder.io/react"; +import { DEFAULT_TEXT_PROPS } from "@/constants/builderProps"; +import TextGradient from "."; +import { COLORS } from "@/constants/builderEnums"; + +Builder.registerComponent(TextGradient, { + ...DEFAULT_TEXT_PROPS, + name: "TextGradient", + inputs: [ + ...DEFAULT_TEXT_PROPS.inputs, + { + name: "color", + type: "string", + enum: COLORS, + defaultValue: "text", + }, + { + name: "type", + type: "string", + enum: ["h1", "h2"], + defaultValue: "h1", + }, + { + name: "as", + type: "string", + enum: ["h1"], + }, + { + name: "size", + type: "number", + }, + ], +}); diff --git a/src/components/TextGradient/cmp.tsx b/src/components/TextGradient/cmp.tsx new file mode 100644 index 0000000..bf67dd8 --- /dev/null +++ b/src/components/TextGradient/cmp.tsx @@ -0,0 +1,25 @@ +"use client"; + +import React from "react"; +import { TextGradientProps } from "./types"; +import { TextGradient as CoreTextGradient } from "@aleph-front/core"; + +export const TextGradient = ({ + children, + textType, + tp, + fs, + ...rest +}: TextGradientProps) => { + const classNames = [`${textType || ""}`, `${tp || ""}`, `${fs || ""}`].join( + " " + ); + + return ( +