Skip to content

Commit

Permalink
Add change text align in text render
Browse files Browse the repository at this point in the history
  • Loading branch information
constantgillet committed Jun 6, 2024
1 parent 22ce7f1 commit 4126cc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
11 changes: 7 additions & 4 deletions app/render-components/TextElementRendered.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ export const TextElementRendered = (props: TextElementProps) => {
},
);

console.log(props);

return (
<p
style={{
Expand All @@ -39,14 +37,19 @@ export const TextElementRendered = (props: TextElementProps) => {
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}
Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4126cc4

Please sign in to comment.