Skip to content

Feature/theme #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
theme progress
Signed-off-by: shmck <[email protected]>
  • Loading branch information
ShMcK committed Jul 24, 2020
commit d59b0e130ce1e9bc343935247607bdef1d5b94af
5 changes: 3 additions & 2 deletions web-app/src/components/BetaBadge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import * as React from 'react'
import { useTheme } from 'emotion-theming'
import { Badge } from '@alifd/next'
import { Theme } from '../../styles/theme'

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

const BetaBadge = ({ children }: Props) => {
const theme = useTheme()
const theme: Theme = useTheme()
return (
<Badge content="beta" style={styles.betaBadge(theme)}>
{children}&nbsp;&nbsp;
Expand Down
29 changes: 0 additions & 29 deletions web-app/src/components/Card/index.tsx

This file was deleted.

15 changes: 8 additions & 7 deletions web-app/src/components/Error/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ import * as T from 'typings'
import { css, jsx } from '@emotion/core'
import Markdown from '../Markdown'
import Button from '../../components/Button'
import { Theme } from '../../styles/theme'

const styles = {
container: {
container: (theme: Theme) => ({
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
justifyContent: 'center' as 'center',
alignItems: 'center' as 'center',
border: '0.5rem solid #FFBABA',
border: `0.5rem solid ${theme['$color-error-2']}`,
padding: '1rem',
width: '100%',
width: '100vw',
height: '100%',
},
content: {
}),
content: (theme: Theme) => ({
textAlign: 'center' as 'center',
color: 'rgb(40, 40, 40);',
},
color: theme['$color-text1-3'],
}),
options: {
display: 'flex' as 'flex',
flexDirection: 'column' as 'column',
Expand Down
134 changes: 0 additions & 134 deletions web-app/src/components/NewUserExperience/NuxTutorial.tsx

This file was deleted.

21 changes: 0 additions & 21 deletions web-app/src/components/NewUserExperience/transition.css

This file was deleted.

18 changes: 0 additions & 18 deletions web-app/src/components/Tag/index.tsx

This file was deleted.

27 changes: 15 additions & 12 deletions web-app/src/components/TestMessage/index.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
import * as React from 'react'
import Icon from '../Icon'
import { css, jsx } from '@emotion/core'
import { useTheme } from 'emotion-theming'
import { Theme } from '../../styles/theme'

const styles = {
container: {
backgroundColor: '#fff3e0',
container: (theme: Theme) => ({
backgroundColor: theme['$color-warning-1'],
padding: '0.5rem',
animationDuration: '0.3s',
animationTimingFunction: 'ease-in-out',
borderTopLeftRadius: '4px',
borderTopRightRadius: '4px',
color: 'rgb(51, 51, 51)',
fontSize: '0.8rem',
},
icon: {
color: '#ff9300',
},
borderTopLeftRadius: theme['$corner-1'],
borderTopRightRadius: theme['$corner-1'],
color: theme['$color-text1-3'],
fontSize: theme['$font-size-caption'],
}),
icon: (theme: Theme) => ({
color: theme['$color-warning-3'],
}),
content: {
marginLeft: '0.5rem',
padding: '0 0.5rem',
},
}

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

const theme: Theme = useTheme()
return visible && props.message ? (
<div css={styles.container}>
<Icon type="warning" style={styles.icon} size="xs" />
<Icon type="warning" style={styles.icon(theme)} size="xs" />
<span css={styles.content}>{props.message}</span>
</div>
) : null
Expand Down
8 changes: 5 additions & 3 deletions web-app/src/components/Workspace/index.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import * as React from 'react'
import { css, jsx } from '@emotion/core'
import { useWindowResize } from './resize'
import { Theme } from '../../styles/theme'

interface Props {
children: React.ReactElement
}

const styles = {
page: {
page: (theme: Theme) => ({
display: 'flex' as 'flex',
position: 'relative' as 'relative',
margin: 0,
backgroundColor: 'white',
},
width: '100vw',
backgroundColor: theme['$color-white'],
}),
}

const Workspace = ({ children }: Props) => {
Expand Down
2 changes: 1 addition & 1 deletion web-app/src/containers/Tutorial/components/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ interface Props {
content: string
status: T.ProgressStatus
subtasks?: T.SubtaskUI[]
displayAll: boolean
displayAll?: boolean
}

const styles = {
Expand Down
Loading