Skip to content

Commit

Permalink
draft: Created Banner component with Sign up and Log in buttons for m…
Browse files Browse the repository at this point in the history
…obile
  • Loading branch information
nastassia committed May 27, 2021
1 parent 89ce00d commit 0cef62f
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 0 deletions.
30 changes: 30 additions & 0 deletions src/v2/Components/LoginSignUpBanner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from "react"
import { Box, Button } from "@artsy/palette"
import { BannerButton } from "./Button"

interface Props {
href: string
}

interface State {}

export class Banner extends React.Component<Props, State> {
render() {
const {} = this.props

return (
<Box>
<BannerButton
href={`/sign_up?intent=signup&contextModule=${template}&destination=${sd.CURRENT_PATH}`}
>
Sign Up
</BannerButton>
<BannerButton
href={`/log_in?intent=login&contextModule=${template}&destination=${sd.CURRENT_PATH}`}
>
Log In
</BannerButton>
</Box>
)
}
}
22 changes: 22 additions & 0 deletions src/v2/Components/LoginSignUpBanner/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from "react"
import { Button } from "@artsy/palette"

interface Props {
href: string
}

interface State {}

export class BannerButton extends React.Component<Props, State> {
render() {
const { href, children } = this.props

return (
<a href={href}>
<Button width="50%" size="small">
{children}
</Button>
</a>
)
}
}
Empty file.

0 comments on commit 0cef62f

Please sign in to comment.