Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 86 edit button #88

Merged
merged 10 commits into from
Aug 4, 2020
2 changes: 2 additions & 0 deletions src/components/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const Nav = styled.nav`
height: 100vh;
background: white;
padding: 20px;
z-index: 100;
`
const Main = styled.main`
min-height: calc(100vh - 222px - 60px);
Expand Down Expand Up @@ -125,6 +126,7 @@ const AuthenticationMenu = styled.div`
background: var(--background);
border: 1px solid var(--accent);
transition: all 200ms ease;
z-index: 100;
`

const Layout: FunctionComponent = ({ children }) => {
Expand Down
1 change: 1 addition & 0 deletions src/components/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const PrimaryLink = styled(Link)`
text-transform: lowercase;
transition: all 200ms ease;
text-decoration: none;
text-align: center;
&:hover {
background: var(--mainDark);
}
Expand Down
5 changes: 2 additions & 3 deletions src/views/ListTemplateLetters/ListTemplateLetters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ import styled from "styled-components"
import { useMetaData } from "../../context/MetaData"
import { useTemplate } from "../../context/TemplateContext"
import ErrorMessage from "../../components/ErrorMessage"
import Layout from "../../components/Layout"
import SEO from "../../components/SEO"
import { format } from "date-fns"
import { PrimaryButton, SecondaryButton } from "../../components/elements"
import { SecondaryButton, PrimaryLink } from "../../components/elements"

const Wrapper = styled.div`
padding: 2rem;
Expand Down Expand Up @@ -108,7 +107,7 @@ const ListTemplateLetters = (props: RouteComponentProps) => {
</TemplateDate>
<TemplatePanel>
<TemplateControls>
<PrimaryButton>Edit</PrimaryButton>
<PrimaryLink to={`/registered-letters/${t.id}`}>Edit</PrimaryLink>
<SecondaryButton>Delete</SecondaryButton>
</TemplateControls>
<TemplateDetails>
Expand Down