1
0
mirror of https://github.com/spacebarchat/client.git synced 2024-11-22 10:22:30 +01:00

add chevrons to member list sections

This commit is contained in:
Puyodead1 2023-11-08 11:28:14 -05:00
parent 887b8940f9
commit ca1f5cb9d9
No known key found for this signature in database
GPG Key ID: BA5F91AAEF68E5CE

View File

@ -1,5 +1,6 @@
import React from "react"; import React from "react";
import styled from "styled-components"; import styled from "styled-components";
import Icon from "./Icon";
const Container = styled.div` const Container = styled.div`
padding: 24px 8px 0 16px; padding: 24px 8px 0 16px;
@ -11,6 +12,9 @@ const Title = styled.span`
color: var(--text-secondary); color: var(--text-secondary);
user-select: none; user-select: none;
cursor: pointer; cursor: pointer;
display: flex;
align-items: center;
`; `;
const Wrapper = styled.div<{ open?: boolean }>` const Wrapper = styled.div<{ open?: boolean }>`
@ -40,7 +44,10 @@ function ListSection(props: Props) {
return ( return (
<Container> <Container>
<Title onClick={toggle}>{props.name}</Title> <Title onClick={toggle}>
<Icon icon={open ? "mdiChevronRight" : "mdiChevronDown"} size={"16px"} />
{props.name}
</Title>
<Wrapper open={open}> <Wrapper open={open}>
{props.items.map((item) => ( {props.items.map((item) => (
<Item>{item}</Item> <Item>{item}</Item>