style: format codebase

This commit is contained in:
Jean-Philippe Sirois
2020-05-19 21:57:49 -04:00
parent 0eaea34b28
commit a1283334b3
37 changed files with 146 additions and 138 deletions
+2 -2
View File
@@ -40,14 +40,14 @@ function Tree({ item }: { item: IFileOrFolder }) {
)
}
export const ArchivesSidebar: FC<HTMLAttributes<HTMLDivElement>> = props => {
export const ArchivesSidebar: FC<HTMLAttributes<HTMLDivElement>> = (props) => {
const archives = useStaticQuery<IAllArchivesQuery>(ALL_ARCHIVES)
const tree = useBuildTree(archives, "/archives")
const sortedTree = sort((a, b) => a.title.localeCompare(b.title), tree)
return (
<Sidebar {...props}>
{sortedTree.map(node => (
{sortedTree.map((node) => (
<Tree item={node} />
))}
</Sidebar>
+4 -4
View File
@@ -6,13 +6,13 @@ export const PageLink = styled(Link)`
display: block;
padding: 4px 0 0;
margin-bottom: 4px;
color: ${props => props.theme.sidebar.foreground};
color: ${(props) => props.theme.sidebar.foreground};
align-self: flex-start;
text-decoration: none;
border-bottom: 2px solid transparent;
&:hover {
border-color: ${props =>
border-color: ${(props) =>
transparentize(0.7, props.theme.sidebar.foreground)};
}
@@ -22,10 +22,10 @@ export const PageLink = styled(Link)`
&.active {
font-weight: 700;
color: ${props => props.theme.sidebar.active};
color: ${(props) => props.theme.sidebar.active};
}
&.active:hover {
border-color: ${props => transparentize(0.7, props.theme.sidebar.active)};
border-color: ${(props) => transparentize(0.7, props.theme.sidebar.active)};
}
`