Skip to content

Commit

Permalink
use MediaQuery instead of tailwind media queries
Browse files Browse the repository at this point in the history
  • Loading branch information
konfig-bot committed Oct 20, 2023
1 parent 4c3601c commit 4b99e38
Showing 1 changed file with 36 additions and 33 deletions.
69 changes: 36 additions & 33 deletions konfigthis.com/src/components/HeaderSimple/HeaderSimple.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
import {
createStyles,
Header,
Container,
rem,
Group,
Anchor,
Button,
UnstyledButton,
Menu,
Burger,
MediaQuery,
} from "@mantine/core";
import logo from "../../../public/portal-logo-light.png";
import Image from "@/components/Image";
import { useSubtleLinkStyles } from "@/utils/use-subtle-link-styles";
import { IconCalendar, IconCalendarEvent } from "@tabler/icons-react";
import { useState } from "react";

Expand Down Expand Up @@ -84,9 +81,11 @@ export function HeaderSimple() {
shadow="md"
width={200}
>
<Menu.Target>
<Burger className="sm:hidden" opened={opened} />
</Menu.Target>
<MediaQuery largerThan="sm" styles={{ display: "none" }}>
<Menu.Target>
<Burger opened={opened} />
</Menu.Target>
</MediaQuery>
<Menu.Dropdown>
<a target="_blank" href="https://konfigthis.com/schedule-demo">
<Menu.Item
Expand All @@ -104,32 +103,36 @@ export function HeaderSimple() {
</a>
</Menu.Dropdown>
</Menu>
<Group className="hidden sm:flex" spacing="md">
<a
className="text-gray-600 hover:text-black"
target="_blank"
href="/blog"
>
Blog
</a>
<a
className="text-gray-600 hover:text-black"
target="_blank"
href="/docs"
>
Documentation
</a>
<Button
color="dark"
component="a"
radius="lg"
target="_blank"
href="https://konfigthis.com/schedule-demo"
leftIcon={<IconCalendarEvent size="0.9rem" />}
>
Book a demo
</Button>
</Group>
<MediaQuery smallerThan="sm" styles={{ display: "none" }}>
<div>
<Group className="flex" spacing="md">
<a
className="text-gray-600 hover:text-black"
target="_blank"
href="/blog"
>
Blog
</a>
<a
className="text-gray-600 hover:text-black"
target="_blank"
href="/docs"
>
Documentation
</a>
<Button
color="dark"
component="a"
radius="lg"
target="_blank"
href="https://konfigthis.com/schedule-demo"
leftIcon={<IconCalendarEvent size="0.9rem" />}
>
Book a demo
</Button>
</Group>
</div>
</MediaQuery>
</Container>
</div>
);
Expand Down

0 comments on commit 4b99e38

Please sign in to comment.