Skip to content

Commit ce4932a

Browse files
committed
fix: sidebar closing arrow + searchbar
1 parent 745cd1b commit ce4932a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/Sidebar.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { mediaQuery } from "../hooks/media-query";
2-
import { FC } from "react";
3-
import { Divider, IconButton, Typography } from "@material-ui/core";
2+
import { FC, ReactNode } from "react";
3+
import { Divider, Typography } from "@material-ui/core";
44
import styled from "styled-components";
55

6-
import AppIcon from "./AppIcon";
7-
86
const Header = styled.div`
97
display: flex;
108
align-items: center;
@@ -31,12 +29,14 @@ const SidebarWrapper = styled.aside<{ closed: boolean }>`
3129
export interface SidebarProps {
3230
open: boolean;
3331
title: string;
32+
searchBar: ReactNode;
3433
onClose: () => void;
3534
}
3635

3736
export const Sidebar: FC<SidebarProps> = ({
3837
children,
3938
title,
39+
searchBar,
4040
onClose,
4141
open = false,
4242
...props
@@ -45,6 +45,7 @@ export const Sidebar: FC<SidebarProps> = ({
4545
<SidebarWrapper closed={!open} {...props}>
4646
<Header>
4747
<Typography variant="overline">{title}</Typography>
48+
{searchBar}
4849
</Header>
4950

5051
<Divider />

0 commit comments

Comments
 (0)