diff options
author | 2025-06-01 04:23:07 +0100 | |
---|---|---|
committer | 2025-06-01 04:23:07 +0100 | |
commit | cb80c2c2126f8bedd5cb0569e31e1ed6a373c531 (patch) | |
tree | a0c003738fe5ece57c90e73d75d69bce10f97ae2 /src | |
parent | Simplify the docker compose build config (diff) |
Support left alignment in section headers
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Question.tsx | 15 |
1 files 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<QuestionProp> { name.push(<span key={name.length - 1}>{name.pop()?.props.children[0]}</span>); 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<QuestionProp> { } `; + if (question.data["align"] === "left") { + styles = css` + ${styles}; + + h1, h3 { + text-align: left; + padding: 0 0rem; + } + `; + }; + const data = question.data["text"]; let text; |