8000 theme progress · AlexRekt/coderoad-vscode@d59b0e1 · GitHub
[go: up one dir, main page]

Skip to content

Commit d59b0e1

Browse files
committed
theme progress
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
1 parent 2d2e1ad commit d59b0e1

File tree

11 files changed

+37
-421
lines changed
  • Workspace
  • containers/Tutorial/components
  • styles
  • stories
  • 11 files changed

    +37
    -421
    lines changed

    web-app/src/components/BetaBadge/index.tsx

    Lines changed: 3 additions & 2 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,9 +1,10 @@
    11
    import * as React from 'react'
    22
    import { useTheme } from 'emotion-theming'
    33
    import { Badge } from '@alifd/next'
    4+
    import { Theme } from '../../styles/theme'
    45

    56
    const styles = {
    6-
    betaBadge: (theme: any) => ({
    7+
    betaBadge: (theme: Theme) => ({
    78
    backgroundColor: theme['$color-brand1-9'], // '#6a67ce',
    89
    color: theme['$color-white'],
    910
    }),
    @@ -14,7 +15,7 @@ type Props = {
    1415
    }
    1516

    1617
    const BetaBadge = ({ children }: Props) => {
    17-
    const theme = useTheme()
    18+
    const theme: Theme = useTheme()
    1819
    return (
    1920
    <Badge content="beta" style={styles.betaBadge(theme)}>
    2021
    {children}&nbsp;&nbsp;

    web-app/src/components/Card/index.tsx

    Lines changed: 0 additions & 29 deletions
    This file was deleted.

    web-app/src/components/Error/index.tsx

    Lines changed: 8 additions & 7 deletions
    Original file line numberDiff line numberDiff line change
    @@ -4,22 +4,23 @@ import * as T from 'typings'
    44
    import { css, jsx } from '@emotion/core'
    55
    import Markdown from '../Markdown'
    66
    import Button from '../../components/Button'
    7+
    import { Theme } from '../../styles/theme'
    78

    89
    const styles = {
    9-
    container: {
    10+
    container: (theme: Theme) => ({
    1011
    display: 'flex' as 'flex',
    1112
    flexDirection: 'column' as 'column',
    1213
    justifyContent: 'center' as 'center',
    1314
    alignItems: 'center' as 'center',
    14-
    border: '0.5rem solid #FFBABA',
    15+
    border: `0.5rem solid ${theme['$color-error-2']}`,
    1516
    padding: '1rem',
    16-
    width: '100%',
    17+
    width: '100vw',
    1718
    height: '100%',
    18-
    },
    19-
    content: {
    19+
    }),
    20+
    content: (theme: Theme) => ({
    2021
    textAlign: 'center' as 'center',
    21-
    color: 'rgb(40, 40, 40);',
    22-
    },
    22+
    color: theme['$color-text1-3'],
    23+
    }),
    2324
    options: {
    2425
    display: 'flex' as 'flex',
    2526
    flexDirection: 'column' as 'column',

    web-app/src/components/NewUserExperience/NuxTutorial.tsx

    Lines changed: 0 additions & 134 deletions
    This file was deleted.

    web-app/src/components/NewUserExperience/transition.css

    Lines changed: 0 additions & 21 deletions
    This file was deleted.

    web-app/src/components/Tag/index.tsx

    Lines changed: 0 additions & 18 deletions
    This file was deleted.

    web-app/src/components/TestMessage/index.tsx

    Lines changed: 15 additions & 12 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,23 +1,25 @@
    11
    import * as React from 'react'
    22
    import Icon from '../Icon'
    33
    import { css, jsx } from '@emotion/core'
    4+
    import { useTheme } from 'emotion-theming'
    5+
    import { Theme } from '../../styles/theme'
    46

    57
    const styles = {
    6-
    container: {
    7-
    backgroundColor: '#fff3e0',
    8+
    container: (theme: Theme) => ({
    9+
    backgroundColor: theme['$color-warning-1'],
    810
    padding: '0.5rem',
    911
    animationDuration: '0.3s',
    1012
    animationTimingFunction: 'ease-in-out',
    11-
    borderTopLeftRadius: '4px',
    12-
    borderTopRightRadius: '4px',
    13-
    color: 'rgb(51, 51, 51)',
    14-
    fontSize: '0.8rem',
    15-
    },
    16-
    icon: {
    17-
    color: '#ff9300',
    18-
    },
    13+
    borderTopLeftRadius: theme['$corner-1'],
    14+
    borderTopRightRadius: theme['$corner-1'],
    15+
    color: theme['$color-text1-3'],
    16+
    fontSize: theme['$font-size-caption'],
    17+
    }),
    18+
    icon: (theme: Theme) => ({
    19+
    color: theme['$color-warning-3'],
    20+
    }),
    1921
    content: {
    20-
    marginLeft: '0.5rem',
    22+
    padding: '0 0.5rem',
    2123
    },
    2224
    }
    2325

    @@ -38,9 +40,10 @@ const TestMessage = (props: Props) => {
    3840
    }
    3941
    }, [props.message])
    4042

    43+
    const theme: Theme = useTheme()
    4144
    return visible && props.message ? (
    4245
    <div css={styles.container}>
    43-
    <Icon type="warning" style={styles.icon} size="xs" />
    46+
    <Icon type="warning" style={styles.icon(theme)} size="xs" />
    4447
    <span css={styles.content}>{props.message}</span>
    4548
    </div>
    4649
    ) : null

    web-app/src/components/Workspace/index.tsx

    Lines changed: 5 additions & 3 deletions
    Original file line numberDiff line numberDiff line change
    @@ -1,18 +1,20 @@
    11
    import * as React from 'react'
    22
    import { css, jsx } from '@emotion/core'
    33
    import { useWindowResize } from './resize'
    4+
    import { Theme } from '../../styles/theme'
    45

    56
    interface Props {
    67
    children: React.ReactElement
    78
    }
    89

    910
    const styles = {
    10-
    page: {
    11+
    page: (theme: Theme) => ({
    1112
    display: 'flex' as 'flex',
    1213
    position: 'relative' as 'relative',
    1314
    margin: 0,
    14-
    backgroundColor: 'white',
    15-
    },
    15+
    width: '100vw',
    16+
    backgroundColor: theme['$color-white'],
    17+
    }),
    1618
    }
    1719

    1820
    const Workspace = ({ children }: Props) => {

    web-app/src/containers/Tutorial/components/Step.tsx

    Lines changed: 1 addition & 1 deletion
    Original file line numberDiff line numberDiff line change
    @@ -8,7 +8,7 @@ interface Props {
    88
    content: string
    99
    status: T.ProgressStatus
    1010
    subtasks?: T.SubtaskUI[]
    11-
    displayAll: boolean
    11+
    displayAll?: boolean
    1212
    }
    1313

    1414
    const styles = {

    0 commit comments

    Comments
     (0)
    0