Skip to content

Commit

Permalink
fix color (#1555)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbaut authored Sep 22, 2021
1 parent 736b881 commit 4919583
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 4 deletions.
13 changes: 9 additions & 4 deletions packages/files-ui/src/Contexts/PosthogContext.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React, { useCallback, useEffect, useMemo, useState } from "react"
import posthog from "posthog-js"
import { Button, Typography, useLocation } from "@chainsafe/common-components"
import { createStyles, ITheme, makeStyles } from "@chainsafe/common-theme"
import { createStyles, makeStyles } from "@chainsafe/common-theme"
import { Trans } from "@lingui/macro"
import { useLocalStorage } from "@chainsafe/browser-storage-hooks"
import { CSFTheme } from "../Themes/types"

export type PosthogContext = {
hasOptedIn: boolean
Expand All @@ -20,7 +21,7 @@ const PosthogContext = React.createContext<PosthogContext>({
})

const useStyles = makeStyles(
({ palette, breakpoints }: ITheme) => {
({ palette, breakpoints, constants }: CSFTheme) => {
return createStyles({
cookieBanner: {
position: "fixed",
Expand All @@ -29,7 +30,7 @@ const useStyles = makeStyles(
display: "flex",
color: palette.common.white.main,
flexDirection: "column",
backgroundColor: palette.primary.main,
backgroundColor: constants.cookieBanner.backgroundColor,
padding: "16px 32px",
[breakpoints.down("sm")]: {
padding: "8px 16px"
Expand Down Expand Up @@ -137,7 +138,11 @@ const PosthogProvider = ({ children }: PosthogProviderProps) => {
</Trans>
</Typography>
<div className={classes.buttonSection}>
<Button onClick={optOutCapturing}><Trans>Decline</Trans></Button>
<Button
onClick={optOutCapturing}
variant='secondary'
>
<Trans>Decline</Trans></Button>
<Button
onClick={optInCapturing}
variant='outline'
Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/Themes/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,7 @@ export interface CsfColors extends IConstants {
color: string
backgroundOptionHover: string
}
cookieBanner: {
backgroundColor: string
}
}
3 changes: 3 additions & 0 deletions packages/files-ui/src/Themes/DarkTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,9 @@ export const darkTheme = createTheme<CsfColors>({
},
surveyBanner: {
color: "var(--gray9)"
},
cookieBanner: {
backgroundColor: "var(--gray9)"
}
} as CsfColors)
},
Expand Down
3 changes: 3 additions & 0 deletions packages/files-ui/src/Themes/LightTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ export const lightTheme = createTheme<CsfColors>({
},
surveyBanner: {
color: "var(--gray1)"
},
cookieBanner: {
backgroundColor: "var(--csf-primary)"
}
} as CsfColors)
},
Expand Down

0 comments on commit 4919583

Please sign in to comment.