This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously. closes #1282
43 lines
751 B
TypeScript
43 lines
751 B
TypeScript
import * as React from "react";
|
|
import styled from "styled-components";
|
|
import env from "~/env";
|
|
import OutlineLogo from "./OutlineLogo";
|
|
|
|
type Props = {
|
|
href?: string;
|
|
};
|
|
|
|
function Branding({ href = env.URL }: Props) {
|
|
return (
|
|
<Link href={href}>
|
|
<OutlineLogo size={16} />
|
|
Outline
|
|
</Link>
|
|
);
|
|
}
|
|
|
|
const Link = styled.a`
|
|
position: fixed;
|
|
bottom: 0;
|
|
left: 0;
|
|
|
|
font-weight: 600;
|
|
font-size: 14px;
|
|
text-decoration: none;
|
|
border-top-right-radius: 2px;
|
|
color: ${(props) => props.theme.text};
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 16px;
|
|
|
|
svg {
|
|
fill: ${(props) => props.theme.text};
|
|
}
|
|
|
|
&:hover {
|
|
background: ${(props) => props.theme.sidebarBackground};
|
|
}
|
|
`;
|
|
|
|
export default Branding;
|