forked from Workday/canvas-kit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwelcomePage.tsx
158 lines (157 loc) · 5.34 KB
/
welcomePage.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
import React from 'react';
// @ts-ignore: Cannot find module error
import headerImage from './storybook-welcome-header.png';
import {Flex, Grid, Box} from '@workday/canvas-kit-react/layout';
import {InstallBlock} from './installBlock';
import {Text, Heading} from '@workday/canvas-kit-react/text';
import {Card} from '@workday/canvas-kit-react/card';
import {ExternalHyperlink, Hyperlink} from '@workday/canvas-kit-react/button';
import {colors} from '@workday/canvas-kit-react/tokens';
import {rocketIcon, tokensIcon, shapesIcon} from '@workday/canvas-system-icons-web';
import {SystemIcon} from '@workday/canvas-kit-react/icon';
import {system} from '@workday/canvas-tokens-web';
import {cssVar} from '@workday/canvas-kit-styling';
// @ts-ignore: Cannot find module error
import {version} from '../../../lerna.json';
export const WelcomePage = () => {
return (
<Flex flexDirection="column" gap="s" marginBottom="m">
<Box borderRadius="m" overflow="hidden" position="relative">
<Flex position="absolute" flexDirection="column" top="30%" left="10%">
<Text
typeLevel="title.medium"
color={colors.frenchVanilla100}
style={{lineHeight: '3vmin', fontSize: '6vmin', marginBottom: cssVar(system.space.x4)}}
>
Canvas Kit
</Text>
<Text
typeLevel="body.large"
style={{lineHeight: '2vw', fontSize: '3vmin'}}
color={colors.frenchVanilla100}
>
v{version}
</Text>
</Flex>
<img src={headerImage} alt="test" style={{width: '100%', height: 'auto'}} />
</Box>
<Text typeLevel="body.medium">
{' '}
This project provides a set of components for the Workday Canvas Design System that can be
used to implement user experiences consistent with{' '}
<ExternalHyperlink
href="https://canvas.workdaydesign.com/"
iconLabel="Open docs in new window"
>
Workday Design Principles.
</ExternalHyperlink>
</Text>
<Heading size="medium" borderBottom={`1px solid ${colors.blueberry200}`} paddingBottom="xxs">
Quick Links
</Heading>
<Grid
gridAutoColumns="auto"
gridTemplateColumns="repeat(auto-fill, minmax(250px, 1fr))"
gridGap="s"
>
<Grid
as={Card}
gridTemplateRows="1fr 1fr 2fr 1fr"
depth="none"
display="grid"
maxHeight={320}
>
<SystemIcon
color={colors.cantaloupe400}
colorHover={colors.cantaloupe400}
icon={rocketIcon}
size={60}
></SystemIcon>
<Card.Heading>Getting Started</Card.Heading>
<Card.Body>
<Text>For all things getting started including helpful guides and docs.</Text>
</Card.Body>
<Grid.Item
as={Hyperlink}
alignSelf="end"
marginTop="xs"
href="https://workday.github.io/canvas-kit/?path=/docs/guides-getting-started--docs"
>
{' '}
Getting Started Guide
</Grid.Item>
</Grid>
<Grid
as={Card}
gridTemplateRows="1fr 1fr 2fr 1fr"
depth="none"
display="grid"
maxHeight={320}
>
<SystemIcon
color={colors.blueberry400}
icon={tokensIcon}
colorHover={colors.blueberry400}
size={60}
></SystemIcon>
<Card.Heading>Tokens</Card.Heading>
<Card.Body>
<Text>
Tokens are the smallest pieces of our Design System with the primary function of
storing UI information.
</Text>
</Card.Body>
<Grid.Item
alignSelf="end"
as={Hyperlink}
marginTop="xs"
href="https://workday.github.io/canvas-kit/?path=/docs/tokens--overview"
>
{' '}
View Our Tokens
</Grid.Item>
</Grid>
<Grid
as={Card}
gridTemplateRows="1fr 1fr 2fr 1fr"
depth="none"
display="grid"
maxHeight={320}
>
<SystemIcon
color={colors.greenApple400}
icon={shapesIcon}
size={60}
colorHover={colors.greenApple400}
></SystemIcon>
<Card.Heading>Assets</Card.Heading>
<Card.Body>
<Text>
Assets are graphics which help communicate meaning or highlight areas of interaction
to our users.
</Text>
</Card.Body>
<Grid.Item
as={Hyperlink}
alignSelf="end"
marginTop="xs"
href="https://workday.github.io/canvas-kit/?path=/docs/assets-icons--overview"
>
{' '}
View Assets
</Grid.Item>
</Grid>
</Grid>
<Heading size="medium" borderBottom={`1px solid ${colors.blueberry200}`} paddingBottom="xxs">
Installation
</Heading>
<Text>
To get started using Canvas kit React first add or install the module to your existing React
project
</Text>
<InstallBlock command="yarn add" packageName="@workday/canvas-kit-react" />
or
<InstallBlock command="npm install" packageName="@workday/canvas-kit-react" />
</Flex>
);
};