mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
Accordian > Accordion
This commit is contained in:
@@ -20,7 +20,7 @@ export interface ComponentProps {
|
||||
isInitiallyExpanded?: boolean | undefined;
|
||||
}
|
||||
|
||||
const Accordian: FunctionComponent<ComponentProps> = (
|
||||
const Accordion: FunctionComponent<ComponentProps> = (
|
||||
props: ComponentProps
|
||||
): ReactElement => {
|
||||
const [isOpen, setIsOpen] = useState<boolean>(false);
|
||||
@@ -117,4 +117,4 @@ const Accordian: FunctionComponent<ComponentProps> = (
|
||||
);
|
||||
};
|
||||
|
||||
export default Accordian;
|
||||
export default Accordion;
|
||||
@@ -4,10 +4,10 @@ export interface ComponentProps {
|
||||
children: Array<ReactElement> | ReactElement;
|
||||
}
|
||||
|
||||
const AccordianGroup: FunctionComponent<ComponentProps> = (
|
||||
const AccordionGroup: FunctionComponent<ComponentProps> = (
|
||||
props: ComponentProps
|
||||
): ReactElement => {
|
||||
return <div className="row accordian-group">{props.children}</div>;
|
||||
};
|
||||
|
||||
export default AccordianGroup;
|
||||
export default AccordionGroup;
|
||||
@@ -6,8 +6,8 @@ import React, {
|
||||
} from 'react';
|
||||
import PageComponentProps from '../PageComponentProps';
|
||||
import Page from '../../Components/Page/Page';
|
||||
import Accordian from 'CommonUI/src/Components/Accordian/Accordian';
|
||||
import AccordianGroup from 'CommonUI/src/Components/Accordian/AccordianGroup';
|
||||
import Accordion from 'CommonUI/src/Components/Accordion/Accordion';
|
||||
import AccordionGroup from 'CommonUI/src/Components/Accordion/AccordionGroup';
|
||||
import Alert from 'CommonUI/src/Components/Alerts/Alert';
|
||||
import URL from 'Common/Types/API/URL';
|
||||
import PageLoader from 'CommonUI/src/Components/Loader/PageLoader';
|
||||
@@ -477,7 +477,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
return groups;
|
||||
};
|
||||
|
||||
const getRightAccordianElement: Function = (
|
||||
const getRightAccordionElement: Function = (
|
||||
group: StatusPageGroup
|
||||
): ReactElement => {
|
||||
let currentStatus: MonitorStatus = new MonitorStatus();
|
||||
@@ -634,13 +634,13 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
|
||||
{statusPageResources.length > 0 && (
|
||||
<div className="bg-white pl-5 pr-5 mt-5 rounded-xl shadow space-y-5">
|
||||
<AccordianGroup>
|
||||
<AccordionGroup>
|
||||
{statusPageResources.filter(
|
||||
(resources: StatusPageResource) => {
|
||||
return !resources.statusPageGroupId;
|
||||
}
|
||||
).length > 0 ? (
|
||||
<Accordian
|
||||
<Accordion
|
||||
key={Math.random()}
|
||||
title={undefined}
|
||||
isLastElement={
|
||||
@@ -648,7 +648,7 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
}
|
||||
>
|
||||
{getMonitorOverviewListInGroup(null)}
|
||||
</Accordian>
|
||||
</Accordion>
|
||||
) : (
|
||||
<></>
|
||||
)}
|
||||
@@ -665,9 +665,9 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
i: number
|
||||
) => {
|
||||
return (
|
||||
<Accordian
|
||||
<Accordion
|
||||
key={i}
|
||||
rightElement={getRightAccordianElement(
|
||||
rightElement={getRightAccordionElement(
|
||||
resourceGroup
|
||||
)}
|
||||
isInitiallyExpanded={
|
||||
@@ -688,12 +688,12 @@ const Overview: FunctionComponent<PageComponentProps> = (
|
||||
{getMonitorOverviewListInGroup(
|
||||
resourceGroup
|
||||
)}
|
||||
</Accordian>
|
||||
</Accordion>
|
||||
);
|
||||
}
|
||||
)}
|
||||
</div>
|
||||
</AccordianGroup>
|
||||
</AccordionGroup>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user