|
1 |
| -import * as React from 'react' |
| 1 | +import Button from 'components/Button' |
| 2 | +import React, { useState, useEffect } from 'react' |
| 3 | +import { Theme } from '../../../styles/theme' |
| 4 | +import Reset from '../components/Reset' |
| 5 | + |
| 6 | +import * as T from 'typings' |
2 | 7 |
|
3 | 8 | const styles = {
|
4 |
| - container: { |
| 9 | + flexColumn: { |
| 10 | + display: 'flex' as 'flex', |
| 11 | + flexDirection: 'column' as 'column', |
| 12 | + }, |
| 13 | + container: (theme: Theme) => ({ |
5 | 14 | display: 'flex' as 'flex',
|
6 | 15 | flexDirection: 'column' as 'column',
|
7 |
| - padding: '1rem', |
| 16 | + backgroundColor: theme['$color-white'], |
| 17 | + height: 'auto', |
| 18 | + }), |
| 19 | + header: (theme: Theme) => ({ |
| 20 | + display: 'flex' as 'flex', |
| 21 | + alignItems: 'center', |
| 22 | + justifyContent: 'space-between', |
| 23 | + height: '2rem', |
| 24 | + backgroundColor: theme['$color-fill1-2'], |
| 25 | + fontSize: '1rem', |
| 26 | + lineHeight: '1rem', |
| 27 | + padding: '10px 0.4rem', |
| 28 | + }), |
| 29 | + content: { |
| 30 | + padding: '0.5rem', |
8 | 31 | },
|
| 32 | + menu: {}, |
| 33 | + menuItem: { |
| 34 | + display: 'flex' as 'flex', |
| 35 | + border: '1px solid rgb(173, 173, 173)', |
| 36 | + borderRadius: '5px', |
| 37 | + padding: '0.5rem', |
| 38 | + }, |
| 39 | + menuItemHeader: { |
| 40 | + fontWeight: 'bold' as 'bold', |
| 41 | + }, |
| 42 | + menuItemContent: {}, |
| 43 | + menuItemButton: { |
| 44 | + marginLeft: 'auto' as 'auto', |
| 45 | + }, |
| 46 | +} |
| 47 | + |
| 48 | +interface Props { |
| 49 | + onReset(): void |
9 | 50 | }
|
10 | 51 |
|
11 |
| -const SettingsPage = () => { |
12 |
| - return <div css={styles.container}>Settings coming soon...</div> |
| 52 | +const SettingsPage = (props: Props) => { |
| 53 | + return ( |
| 54 | + <div css={styles.container}> |
| 55 | + <div css={styles.header}> |
| 56 | + <div>Settings</div> |
| 57 | + </div> |
| 58 | + <div css={styles.content}> |
| 59 | + <div css={styles.menu}> |
| 60 | + <div css={styles.menuItem}> |
| 61 | + <div css={styles.flexColumn}> |
| 62 | + <div css={styles.menuItemHeader}>Reset Tutorial</div> |
| 63 | + <div css={styles.menuItemContent}> |
| 64 | + This will reset the whole tutorial and change the source files back to the first level and first task |
| 65 | + checkpoint. This will reset the whole tutorial and change the source files back to the first level and |
| 66 | + first task checkpoint. This will reset the whole tutorial and change the source files back to the first |
| 67 | + level and first task checkpoint. |
| 68 | + </div> |
| 69 | + </div> |
| 70 | + <Reset style={styles.menuItemButton} warning onReset={props.onReset} /> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | + </div> |
| 74 | + </div> |
| 75 | + ) |
13 | 76 | }
|
14 | 77 |
|
15 | 78 | export default SettingsPage
|
0 commit comments