Skip to content

Commit

Permalink
Unify headings in editor
Browse files Browse the repository at this point in the history
  • Loading branch information
adammertel committed Nov 3, 2023
1 parent b22476f commit 5854122
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import {
import { useSearchParams } from "hooks";
import React, { useEffect, useMemo, useState } from "react";
import {
AiFillCaretRight,
AiOutlineCaretDown,
AiOutlineCaretUp,
AiOutlineWarning,
} from "react-icons/ai";
import { FaRegCopy } from "react-icons/fa";
Expand Down Expand Up @@ -700,20 +700,24 @@ export const StatementEditor: React.FC<StatementEditor> = ({

{statement.warnings.length > 0 && (
<StyledEditorSection>
<StyledEditorSectionHeading>
{statement.warnings.length} Warnings{" "}
<TiWarningOutline size={16} style={{ marginLeft: "3px" }} />
</StyledEditorSectionHeading>
<StyledEditorSectionContent>
<StyledEditorSectionHeader>
<StyledEditorSectionHeading>
{statement.warnings.length} Warnings{" "}
{statement.warnings.length > 0 && (
<TiWarningOutline size={16} style={{ marginLeft: "3px" }} />
)}
</StyledEditorSectionHeading>
<Button
iconRight={
showWarnings ? <AiOutlineCaretDown /> : <AiFillCaretRight />
showWarnings ? <AiOutlineCaretUp /> : <AiOutlineCaretDown />
}
label={showWarnings ? "hide warnings" : "show warnings"}
onClick={() => dispatch(setShowWarnings(!showWarnings))}
color="warning"
tooltipPosition="right"
/>
</StyledEditorSectionHeader>
<StyledEditorSectionContent>
{showWarnings &&
statement.warnings
.sort((a, b) => a.type.localeCompare(b.type))
Expand Down

0 comments on commit 5854122

Please sign in to comment.