Skip to content

Commit

Permalink
(refactor) Refactor some styles
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Jul 31, 2023
1 parent cce74ba commit 879dd2f
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
6 changes: 1 addition & 5 deletions src/components/form-editor/form-editor.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,7 @@ type Status = "idle" | "formLoaded" | "schemaLoaded";
const Error = ({ error, title }: ErrorProps) => {
return (
<InlineNotification
style={{
minWidth: "100%",
margin: "0rem",
padding: "0rem",
}}
className={styles.errorNotification}
kind={"error"}
lowContrast
subtitle={error?.message}
Expand Down
6 changes: 6 additions & 0 deletions src/components/form-editor/form-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,9 @@
margin-left: 0;
margin-right: 0;
}

.errorNotification {
min-width: 100%;
margin: 0;
padding: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({
{schema?.pages?.length
? schema.pages.map((page, pageIndex) => (
<div className={styles.editableFieldsContainer}>
<div style={{ display: "flex", alignItems: "center" }}>
<div className={styles.flexContainer}>
<div className={styles.editorContainer}>
<EditableValue
elementType="page"
Expand Down Expand Up @@ -410,9 +410,7 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({
<Accordion>
<AccordionItem title={section.label}>
<>
<div
style={{ display: "flex", alignItems: "center" }}
>
<div className={styles.flexContainer}>
<div className={styles.editorContainer}>
<EditableValue
elementType="section"
Expand Down Expand Up @@ -446,12 +444,7 @@ const InteractiveBuilder: React.FC<InteractiveBuilderProps> = ({
{section.questions?.length ? (
section.questions.map(
(question, questionIndex) => (
<div
style={{
display: "flex",
alignItems: "center",
}}
>
<div className={styles.flexContainer}>
<div className={styles.editorContainer}>
<p className={styles.questionLabel}>
{question.label}
Expand Down
5 changes: 5 additions & 0 deletions src/components/interactive-builder/interactive-builder.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
}
}

.flexContainer {
display: flex;
align-items: center;
}

.helperText {
@include type.type-style('body-compact-01');
margin: 1rem 0rem;
Expand Down
2 changes: 1 addition & 1 deletion src/components/schema-editor/schema-editor.component.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ const SchemaEditor: React.FC<SchemaEditorProps> = ({
) : null}

<AceEditor
style={{ height: "100vh", width: "100%" }}
className={styles.editorContainer}
mode="json"
theme="textmate"
name="schemaEditor"
Expand Down
5 changes: 5 additions & 0 deletions src/components/schema-editor/schema-editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@
}
}

.editorContainer {
height: 100vh;
width: 100%;
}

.errorContainer {
@include type.type-style("body-compact-02");
background-color: colors.$red-20;
Expand Down

0 comments on commit 879dd2f

Please sign in to comment.