Skip to content
This repository has been archived by the owner on May 10, 2020. It is now read-only.

Commit

Permalink
Merge pull request #46 from igorkamyshev/hello
Browse files Browse the repository at this point in the history
feat: add hello page
  • Loading branch information
igorkamyshev authored Feb 20, 2019
2 parents 3e61fce + 9ce85a0 commit 75a8020
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 2 deletions.
4 changes: 3 additions & 1 deletion front/pages/internal/hello.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import * as React from 'react'

import { Hello } from '@front/features/hello'

export default class HelloPage extends React.Component {
public static isSecure = true

public render() {
return <p>hello</p>
return <Hello />
}
}
12 changes: 12 additions & 0 deletions front/src/Link.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { ReactChild, ReactFragment } from 'react'

import NextRoutes from '../routes'

interface Props {
route?: string
children: ReactChild | ReactFragment
}

export const Link = ({ children, ...props }: Props) => (
<NextRoutes.Link {...props}>{children}</NextRoutes.Link>
)
17 changes: 17 additions & 0 deletions front/src/features/hello/Hello.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.container {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
justify-items: center;
width: 100vw;
height: 100vh;
padding: 24px;
padding-bottom: 192px;

& > * {
padding: 0 48px;
margin: 24px 0;
text-align: center;
}
}
17 changes: 17 additions & 0 deletions front/src/features/hello/Hello.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { pushRoute } from '@front/pushRoute'
import { Button } from '@front/ui/atoms/button'

import * as styles from './Hello.css'

export const Hello = () => {
return (
<section className={styles.container}>
<h1>
Checkmoney Space
<br />
<small>Wellcome!</small>
</h1>
<Button onClick={() => pushRoute('/app')}>Start</Button>
</section>
)
}
1 change: 1 addition & 0 deletions front/src/features/hello/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { Hello } from './Hello'
9 changes: 8 additions & 1 deletion front/src/ui/atoms/button/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,17 @@ interface Props {
submit?: boolean
children: string
className?: string
onClick?: () => void
}

export const Button = ({ submit = false, children, className }: Props) => (
export const Button = ({
submit = false,
children,
onClick,
className,
}: Props) => (
<AntButton
onClick={onClick}
htmlType={resolveType(submit)}
className={className}
type="primary"
Expand Down

0 comments on commit 75a8020

Please sign in to comment.