From 4126cc48770d5a980653d294eae2be30923e78b1 Mon Sep 17 00:00:00 2001 From: constantgillet Date: Thu, 6 Jun 2024 23:31:42 +0200 Subject: [PATCH] Add change text align in text render --- app/render-components/TextElementRendered.tsx | 11 +++++++---- package-lock.json | 1 - 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/app/render-components/TextElementRendered.tsx b/app/render-components/TextElementRendered.tsx index cff3c58..141f684 100644 --- a/app/render-components/TextElementRendered.tsx +++ b/app/render-components/TextElementRendered.tsx @@ -27,8 +27,6 @@ export const TextElementRendered = (props: TextElementProps) => { }, ); - console.log(props); - return (

{ fontWeight: props.fontWeight, fontSize: `${props.fontSize}px`, textTransform: props.textTransform, - textAlign: props.textAlign, width: `${props.width}px`, height: `${props.height}px`, color: addAlphaToHex(props.color, props.textColorOpacity), overflowWrap: "break-word", whiteSpace: "pre-wrap", - backgroundColor: "rgba(255, 255, 255, 0.4)", wordBreak: "break-word", + textAlign: props.textAlign, + justifyContent: + props.textAlign === "center" + ? "center" + : props.textAlign === "right" + ? "flex-end" + : "flex-start", }} > {contentWithVariables} diff --git a/package-lock.json b/package-lock.json index 12f1dc1..c6cf567 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1665,7 +1665,6 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", - "extraneous": true, "inBundle": true, "license": "MIT", "engines": {