diff --git a/Common/Types/Icon/IconProp.ts b/Common/Types/Icon/IconProp.ts index cfac298a2f..7c9458f596 100644 --- a/Common/Types/Icon/IconProp.ts +++ b/Common/Types/Icon/IconProp.ts @@ -17,6 +17,7 @@ enum IconProp { Squares = 'Squares', RectangleStack = 'RectangleStack', ChartBar = 'ChartBar', + CircleClose = 'CircleClose', SquareStack = 'SquareStack', Calendar = 'Calendar', Help = 'Help', diff --git a/CommonUI/src/Components/Checkbox/CheckboxViewer.tsx b/CommonUI/src/Components/Checkbox/CheckboxViewer.tsx new file mode 100644 index 0000000000..432720cb7d --- /dev/null +++ b/CommonUI/src/Components/Checkbox/CheckboxViewer.tsx @@ -0,0 +1,27 @@ + +import React, { FunctionComponent, ReactElement } from 'react'; +import { Green, Red } from 'Common/Types/BrandColors'; +import IconProp from 'Common/Types/Icon/IconProp'; +import Icon from '../Icon/Icon'; + +export interface ComponentProps { + text: string; + isChecked: boolean; +} + +const CheckboxViewer: FunctionComponent = ( + props: ComponentProps +): ReactElement => { + return (
+
+
+ {props.isChecked ? : } +
+
+ {props.text} +
+
+
) +}; + +export default CheckboxViewer; diff --git a/CommonUI/src/Components/Icon/Icon.tsx b/CommonUI/src/Components/Icon/Icon.tsx index 19b26b38a9..11914ba700 100644 --- a/CommonUI/src/Components/Icon/Icon.tsx +++ b/CommonUI/src/Components/Icon/Icon.tsx @@ -140,6 +140,13 @@ const Icon: FunctionComponent = ({ strokeLinejoin="round" d="M3.75 12h16.5m-16.5 3.75h16.5M3.75 19.5h16.5M5.625 4.5h12.75a1.875 1.875 0 010 3.75H5.625a1.875 1.875 0 010-3.75z" /> + ); + } else if (icon === IconProp.CircleClose) { + return getSvgWrapper( + + + + ); } else if (icon === IconProp.Swatch) { return getSvgWrapper( diff --git a/Dashboard/src/Pages/Incidents/View/PublicNote.tsx b/Dashboard/src/Pages/Incidents/View/PublicNote.tsx index 748abbc71f..0f7ab35cbb 100644 --- a/Dashboard/src/Pages/Incidents/View/PublicNote.tsx +++ b/Dashboard/src/Pages/Incidents/View/PublicNote.tsx @@ -31,6 +31,7 @@ import DropdownUtil from 'CommonUI/src/Utils/Dropdown'; import BasicFormModal from 'CommonUI/src/Components/FormModal/BasicFormModal'; import ConfirmModal from 'CommonUI/src/Components/Modal/ConfirmModal'; import OneUptimeDate from 'Common/Types/Date'; +import CheckboxViewer from 'CommonUI/src/Components/Checkbox/CheckboxViewer'; const PublicNote: FunctionComponent = ( props: PageComponentProps @@ -246,6 +247,7 @@ const PublicNote: FunctionComponent = ( contentClassName: 'mt-1 whitespace-nowrap text-sm text-gray-600 sm:mt-0 sm:ml-3 text-right', }, + { field: { note: true, @@ -254,9 +256,22 @@ const PublicNote: FunctionComponent = ( title: '', type: FieldType.Markdown, contentClassName: - '-mt-3 space-y-6 text-sm text-gray-800', + '-mt-3 space-y-1 text-sm text-gray-800', colSpan: 2, }, + { + field: { + shouldStatusPageSubscribersBeNotifiedOnNoteCreated: true, + }, + title: '', + type: FieldType.Boolean, + colSpan: 2, + getElement: (item: JSONObject): ReactElement => { + return (
) + } + }, ]} />