From cb80c2c2126f8bedd5cb0569e31e1ed6a373c531 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sun, 1 Jun 2025 04:23:07 +0100 Subject: Support left alignment in section headers --- src/components/Question.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/Question.tsx b/src/components/Question.tsx index 66784d0..5da2903 100644 --- a/src/components/Question.tsx +++ b/src/components/Question.tsx @@ -269,9 +269,9 @@ class RenderedQuestion extends React.Component { name.push({name.pop()?.props.children[0]}); if (question.type === QuestionType.Section) { - const styles = css` + let styles = css` h1 { - margin-bottom: 0; + margin-bottom: 0.5rem; } h3 { @@ -290,6 +290,17 @@ class RenderedQuestion extends React.Component { } `; + if (question.data["align"] === "left") { + styles = css` + ${styles}; + + h1, h3 { + text-align: left; + padding: 0 0rem; + } + `; + }; + const data = question.data["text"]; let text; -- cgit v1.2.3