From 9ce85a003155ba65be0fa0e38c70918c1b203bb5 Mon Sep 17 00:00:00 2001 From: Igor Kamyshev Date: Wed, 20 Feb 2019 07:26:12 +0200 Subject: [PATCH] feat: add hello page --- front/pages/internal/hello.tsx | 4 +++- front/src/Link.tsx | 12 ++++++++++++ front/src/features/hello/Hello.css | 17 +++++++++++++++++ front/src/features/hello/Hello.tsx | 17 +++++++++++++++++ front/src/features/hello/index.ts | 1 + front/src/ui/atoms/button/Button.tsx | 9 ++++++++- 6 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 front/src/Link.tsx create mode 100644 front/src/features/hello/Hello.css create mode 100644 front/src/features/hello/Hello.tsx create mode 100644 front/src/features/hello/index.ts diff --git a/front/pages/internal/hello.tsx b/front/pages/internal/hello.tsx index 62b8010..4e3c34c 100644 --- a/front/pages/internal/hello.tsx +++ b/front/pages/internal/hello.tsx @@ -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

hello

+ return } } diff --git a/front/src/Link.tsx b/front/src/Link.tsx new file mode 100644 index 0000000..a2cf17c --- /dev/null +++ b/front/src/Link.tsx @@ -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) => ( + {children} +) diff --git a/front/src/features/hello/Hello.css b/front/src/features/hello/Hello.css new file mode 100644 index 0000000..d44ccf7 --- /dev/null +++ b/front/src/features/hello/Hello.css @@ -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; + } +} diff --git a/front/src/features/hello/Hello.tsx b/front/src/features/hello/Hello.tsx new file mode 100644 index 0000000..a8fa16f --- /dev/null +++ b/front/src/features/hello/Hello.tsx @@ -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 ( +
+

+ Checkmoney Space +
+ Wellcome! +

+ +
+ ) +} diff --git a/front/src/features/hello/index.ts b/front/src/features/hello/index.ts new file mode 100644 index 0000000..7012a45 --- /dev/null +++ b/front/src/features/hello/index.ts @@ -0,0 +1 @@ +export { Hello } from './Hello' diff --git a/front/src/ui/atoms/button/Button.tsx b/front/src/ui/atoms/button/Button.tsx index 7b0e07e..dc97f6d 100644 --- a/front/src/ui/atoms/button/Button.tsx +++ b/front/src/ui/atoms/button/Button.tsx @@ -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) => (