Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ShMcK merged 8 commits intomasterfromfeature/theme
Jul 25, 2020
Merged
Show file tree
Hide file tree
Changes fromall commits
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
1 change: 0 additions & 1 deletionsrc/commands.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,6 @@ export const createCommands = ({ extensionPath, workspaceState }: CreateCommandP
return {
// initialize
[COMMANDS.START]: async () => {
console.log('start')
if (webview && webview.state.loaded) {
webview.createOrShow()
} else {
Expand Down
2 changes: 1 addition & 1 deletionweb-app/.storybook/config.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
import { configure } from '@storybook/react'
import '../src/styles/index.css'
import '../src/styles/reset.css'

// setup acquireVsCodeApi mock
// @ts-ignore
Expand Down
1 change: 0 additions & 1 deletionweb-app/package.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -26,7 +26,6 @@
},
"dependencies": {
"@alifd/next":"^1.20.20",
"@alifd/theme-4":"^0.3.1",
"@emotion/babel-preset-css-prop":"^10.0.27",
"@emotion/core":"^10.0.28",
"babel-jest":"^26.1.0",
Expand Down
14 changes: 9 additions & 5 deletionsweb-app/src/App.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,16 +3,20 @@ import { ConfigProvider } from '@alifd/next'
import enUS from '@alifd/next/lib/locale/en-us'
import ErrorBoundary from './components/ErrorBoundary'
import Workspace from './components/Workspace'
import { ThemeProvider } from 'emotion-theming'
import theme from './styles/theme'
import Routes from './Routes'

const App = () => (
/* @ts-ignore invalid in enUS locale typings for @alifd/next@1.20.20 https://github.com/alibaba-fusion/next/commit/e3b934b */
<ConfigProvider locale={enUS}>
<ErrorBoundary>
<Workspace>
<Routes />
</Workspace>
</ErrorBoundary>
<Workspace>
<ErrorBoundary>
<ThemeProvider theme={theme}>
<Routes />
</ThemeProvider>
</ErrorBoundary>
</Workspace>
</ConfigProvider>
)

Expand Down
13 changes: 8 additions & 5 deletionsweb-app/src/components/BetaBadge/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
import * as React from 'react'
import { useTheme } from 'emotion-theming'
import { Badge } from '@alifd/next'
import { Theme } from '../../styles/theme'

const styles = {
betaBadge: {
backgroundColor:'#6a67ce',
color:'#FFFFFF',
},
betaBadge:(theme: Theme) => ({
backgroundColor:theme['$color-brand1-9'],
color:theme['$color-white'],
}),
}

type Props = {
children: React.ReactElement | string
}

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

This file was deleted.

14 changes: 0 additions & 14 deletionsweb-app/src/components/Divider.tsx
View file
Open in desktop

This file was deleted.

14 changes: 8 additions & 6 deletionsweb-app/src/components/Error/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -4,22 +4,24 @@ 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%',
maxWidth: '100%',
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
1 change: 1 addition & 0 deletionsweb-app/src/components/Markdown/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
import MarkdownIt from 'markdown-it'
import Prism from 'prismjs'
import { css, jsx, InterpolationWithTheme } from '@emotion/core'
// @ts-ignore no types for package
import markdownEmoji from 'markdown-it-emoji'
import * as React from 'react'
Expand Down
134 changes: 0 additions & 134 deletionsweb-app/src/components/NewUserExperience/NuxTutorial.tsx
View file
Open in desktop

This file was deleted.

21 changes: 0 additions & 21 deletionsweb-app/src/components/NewUserExperience/transition.css
View file
Open in desktop

This file was deleted.

18 changes: 0 additions & 18 deletionsweb-app/src/components/Tag/index.tsx
View file
Open in desktop

This file was deleted.

27 changes: 15 additions & 12 deletionsweb-app/src/components/TestMessage/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff 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: '00.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
Loading

[8]ページ先頭

©2009-2025 Movatter.jp