aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Joe Banks <[email protected]>2025-06-01 04:23:07 +0100
committerGravatar Joe Banks <[email protected]>2025-06-01 04:23:07 +0100
commitcb80c2c2126f8bedd5cb0569e31e1ed6a373c531 (patch)
treea0c003738fe5ece57c90e73d75d69bce10f97ae2 /src
parentSimplify the docker compose build config (diff)
Support left alignment in section headers
Diffstat (limited to 'src')
-rw-r--r--src/components/Question.tsx15
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;