Skip to content

Commit

Permalink
Fix storybook colors
Browse files Browse the repository at this point in the history
  • Loading branch information
kattylucy committed Sep 3, 2024
1 parent 14f23fa commit 794fca6
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 16 deletions.
12 changes: 6 additions & 6 deletions centrifuge-app/src/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { TransactionOptions } from '@centrifuge/centrifuge-js'
import { EvmChains } from '@centrifuge/centrifuge-react'
import { centrifugeLight } from '@centrifuge/fabric'
import { centrifugeTheme } from '@centrifuge/fabric'
import arbitrumLogo from '@centrifuge/fabric/assets/logos/arbitrum.svg'
import assetHubLogo from '@centrifuge/fabric/assets/logos/assethub.svg'
import baseLogo from '@centrifuge/fabric/assets/logos/base.svg'
Expand All @@ -23,17 +23,17 @@ export const FEATURED_COLLECTIONS = [
]

const lightTheme: DefaultTheme = {
...centrifugeLight,
...centrifugeTheme,
sizes: {
...centrifugeLight.sizes,
...centrifugeTheme.sizes,
mainContent: 1800,
},
colors: {
...centrifugeLight.colors,
placeholderBackground: centrifugeLight.colors.backgroundSecondary,
...centrifugeTheme.colors,
placeholderBackground: centrifugeTheme.colors.backgroundSecondary,
},
typography: {
...centrifugeLight.typography,
...centrifugeTheme.typography,
headingLarge: {
fontSize: [24, 24, 36],
lineHeight: 1.25,
Expand Down
8 changes: 3 additions & 5 deletions fabric/.storybook/preview.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@ import { ThemeProvider } from 'styled-components'
import { Box, GlobalStyle } from '../src'
import altairDark from '../src/theme/altairDark'
import altairLight from '../src/theme/altairLight'
import centrifugeDark from '../src/theme/centrifugeDark'
import centrifugeLight from '../src/theme/centrifugeLight'
import centrifugeTheme from '../src/theme/centrifugeTheme'

const themes = {
altairDark,
altairLight,
centrifugeDark,
centrifugeLight,
centrifugeTheme,
}

export const parameters = {
Expand Down Expand Up @@ -40,7 +38,7 @@ export const globalTypes = {

export const decorators = [
(Story, context) => (
<ThemeProvider theme={themes[context.globals.theme] || themes.centrifugeLight}>
<ThemeProvider theme={themes[context.globals.theme] || themes.centrifugeTheme}>
<>
<GlobalStyle />
<Box p={3} bg="backgroundPage" minHeight="100vh">
Expand Down
2 changes: 1 addition & 1 deletion fabric/src/components/CurrencyInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const StyledMaxButton = styled(Box)`
padding: 0 8px;
border: 0;
border-radius: 12px;
color: ${({ theme }) => theme.colors.textPrimary};
color: ${({ theme }) => theme.colors.textInverted};
background-color: ${({ theme }) => theme.colors.backgroundPrimary};
cursor: pointer;
appearance: none;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { blueScale, grayScale, yellowScale } from './tokens/colors'
import { colorTheme } from './tokens/theme'
import { FabricTheme } from './types'

export const centrifugeLight: FabricTheme = {
export const centrifugeTheme: FabricTheme = {
...baseTheme,
scheme: 'light',
colors: {
Expand All @@ -25,4 +25,4 @@ export const centrifugeLight: FabricTheme = {
},
}

export default centrifugeLight
export default centrifugeTheme
2 changes: 1 addition & 1 deletion fabric/src/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './altairDark'
export * from './altairLight'
export * from './centrifugeLight'
export * from './centrifugeTheme'
export * from './types'
2 changes: 1 addition & 1 deletion fabric/src/theme/tokens/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const colors = {
backgroundButtonPrimaryFocus: gold,
backgroundButtonPrimaryHover: gold,
backgroundButtonPrimaryPressed: yellowScale[500],
backgroundButtonPrimaryDisabled: yellowScale[500],
backgroundButtonPrimaryDisabled: grayScale[300],
textButtonPrimary: black,
textButtonPrimaryFocus: black,
textButtonPrimaryHover: black,
Expand Down

0 comments on commit 794fca6

Please sign in to comment.