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
setup theme
Signed-off-by: shmck <[email protected]>
  • Loading branch information
ShMcK committed Jul 24, 2020
commit 2d2e1ad6c8328330c586ab937409e2fa01bf14f3
1 change: 0 additions & 1 deletion web-app/package.json
Original file line number Diff line number Diff 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
12 changes: 7 additions & 5 deletions web-app/src/components/BetaBadge/index.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import * as React from 'react'
import { useTheme } from 'emotion-theming'
import { Badge } from '@alifd/next'

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

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

const BetaBadge = ({ children }: Props) => {
const theme = useTheme()
return (
<Badge content="beta" style={styles.betaBadge}>
<Badge content="beta" style={styles.betaBadge(theme)}>
{children}&nbsp;&nbsp;
</Badge>
)
Expand Down
1 change: 0 additions & 1 deletion web-app/src/styles/index.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import '~@alifd/next/dist/next.min.css';
/* @import '~@alifd/theme-4/dist/next.css'; */
@import './font.css';

html {
Expand Down
Loading