Skip to content

Commit

Permalink
feat(styling): remove collapsible headers (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
Chattox authored Jul 9, 2024
1 parent f6de95c commit 94ce3c2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 36 deletions.
11 changes: 0 additions & 11 deletions src/components/DashboardContainer/DashboardContainer.module.css

This file was deleted.

36 changes: 11 additions & 25 deletions src/components/DashboardContainer/DashboardContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Accordion, Box, Group, Title } from "@mantine/core";
import { Box, Group, Title } from "@mantine/core";
import { LatestReading } from "../LatestReading";
import { ColorSchemeSwitcher } from "../ColorSchemeSwitcher";
import classes from "./DashboardContainer.module.css";
import { ReadingsHistoryContainer } from "../ReadingsHistoryContainer";

export const DashboardContainer = (props: { isMobile: boolean }) => {
Expand All @@ -13,29 +12,16 @@ export const DashboardContainer = (props: { isMobile: boolean }) => {
</Title>
<ColorSchemeSwitcher />
</Group>
<Accordion
multiple
defaultValue={["latest", "overview"]}
chevronPosition="left"
classNames={{
item: classes.item,
label: classes.label,
content: props.isMobile ? classes.content : undefined,
}}
>
<Accordion.Item key="latest" value="latest">
<Accordion.Control>Current conditions</Accordion.Control>
<Accordion.Panel>
<LatestReading isMobile={props.isMobile} />
</Accordion.Panel>
</Accordion.Item>
<Accordion.Item key="overview" value="overview">
<Accordion.Control>History</Accordion.Control>
<Accordion.Panel>
<ReadingsHistoryContainer isMobile={props.isMobile} />
</Accordion.Panel>
</Accordion.Item>
</Accordion>
<Title order={4} ta="left" my="sm">
Current conditions
</Title>

<LatestReading isMobile={props.isMobile} />
<Title order={4} ta="left" mt="md" mb="sm">
History
</Title>

<ReadingsHistoryContainer isMobile={props.isMobile} />
</Box>
);
};

0 comments on commit 94ce3c2

Please sign in to comment.