feat: redesign server listing design language

This commit is contained in:
41666 2021-07-10 15:03:10 -04:00
parent e5d83bc133
commit 0ed5d696df
4 changed files with 71 additions and 7 deletions

View file

@ -1,5 +1,6 @@
import { palette } from '@roleypoly/design-system/atoms/colors';
import { transitions } from '@roleypoly/design-system/atoms/timings';
import { text400 } from '@roleypoly/design-system/atoms/typography';
import styled from 'styled-components';
export const GuildNavItem = styled.a`
@ -19,3 +20,23 @@ export const GuildNavItem = styled.a`
cursor: pointer;
}
`;
export const SectionHead = styled.div`
${text400}
display: flex;
align-items: center;
justify-content: left;
svg {
position: relative;
top: 1px;
color: ${palette.taupe500};
}
`;
export const HeadLine = styled.div`
flex: 1;
height: 1px;
background-color: ${palette.taupe300};
margin-left: 0.5em;
`;

View file

@ -3,9 +3,9 @@ import { getRecentAndSortedGuilds } from '@roleypoly/misc-utils/guildListing';
import { GuildSlug, UserGuildPermissions } from '@roleypoly/types';
import * as React from 'react';
import Scrollbars from 'react-custom-scrollbars';
import { GoStar, GoZap } from 'react-icons/go';
import { GoHistory, GoListUnordered, GoStar, GoZap } from 'react-icons/go';
import ReactTooltip from 'react-tooltip';
import { GuildNavItem } from './GuildNav.styled';
import { GuildNavItem, HeadLine, SectionHead } from './GuildNav.styled';
type Props = {
guilds: GuildSlug[];
@ -55,9 +55,17 @@ export const GuildNav = (props: Props) => {
>
{recentGuildSlugs && (
<>
<div>Recents</div>
<SectionHead>
<GoHistory />
&nbsp; Recent Guilds
<HeadLine />
</SectionHead>
<NavList guilds={recentGuildSlugs} />
<div>All Guilds</div>
<SectionHead>
<GoListUnordered />
&nbsp; All Guilds
<HeadLine />
</SectionHead>
</>
)}
<NavList guilds={sortedGuildSlugs} />