2022-03-15 14:56:09 +00:00
|
|
|
import * as React from "react";
|
|
|
|
import { Link } from "gatsby";
|
|
|
|
import styled from "styled-components";
|
|
|
|
|
2022-04-07 11:52:50 +00:00
|
|
|
import DashboardLayout from "./DashboardLayout";
|
2022-03-15 14:56:09 +00:00
|
|
|
|
|
|
|
const Sidebar = () => (
|
2022-04-07 11:52:50 +00:00
|
|
|
<aside className="w-full lg:w-48 text-sm font-sans font-light text-palette-600 shrink-0">
|
|
|
|
<nav className="bg-white">
|
2022-03-15 14:56:09 +00:00
|
|
|
<SidebarLink activeClassName="!border-l-primary" to="/settings">
|
|
|
|
Account
|
|
|
|
</SidebarLink>
|
|
|
|
<SidebarLink activeClassName="!border-l-primary" to="/settings/notifications">
|
|
|
|
Notifications
|
|
|
|
</SidebarLink>
|
|
|
|
<SidebarLink activeClassName="!border-l-primary" to="/settings/export">
|
2022-03-17 12:15:55 +00:00
|
|
|
Export
|
2022-03-15 14:56:09 +00:00
|
|
|
</SidebarLink>
|
|
|
|
<SidebarLink activeClassName="!border-l-primary" to="/settings/api-keys">
|
|
|
|
API Keys
|
|
|
|
</SidebarLink>
|
|
|
|
</nav>
|
|
|
|
</aside>
|
|
|
|
);
|
|
|
|
|
|
|
|
const SidebarLink = styled(Link).attrs({
|
2022-04-07 11:52:50 +00:00
|
|
|
className: `h-12 py-3 px-6 w-full flex
|
2022-03-15 14:56:09 +00:00
|
|
|
border-l-2 border-l-palette-200
|
|
|
|
border-b border-b-palette-100 last:border-b-transparent`,
|
|
|
|
})``;
|
|
|
|
|
|
|
|
const Content = styled.main.attrs({
|
2022-03-16 08:05:25 +00:00
|
|
|
className: "relative bg-white rounded px-6 py-6 sm:px-16 sm:py-14 mt-6 lg:mt-0 bg-none xl:bg-corner-circle",
|
2022-03-15 14:56:09 +00:00
|
|
|
})`
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
`;
|
|
|
|
|
|
|
|
const UserSettingsLayout = ({ children }) => (
|
2022-04-07 11:52:50 +00:00
|
|
|
<DashboardLayout>
|
|
|
|
<h6 className="hidden md:block mb-2 text-palette-400">Settings</h6>
|
|
|
|
<div className="flex flex-col lg:flex-row">
|
|
|
|
<Sidebar />
|
|
|
|
<Content className="lg:w-settings-lg xl:w-settings-xl">{children}</Content>
|
|
|
|
</div>
|
|
|
|
</DashboardLayout>
|
2022-03-15 14:56:09 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export default UserSettingsLayout;
|