diff --git a/desktop/app/src/chrome/ListView.tsx b/desktop/app/src/chrome/ListView.tsx index 75b645661..7d94df8a6 100644 --- a/desktop/app/src/chrome/ListView.tsx +++ b/desktop/app/src/chrome/ListView.tsx @@ -16,12 +16,12 @@ import { Spacer, Checkbox, Radio, - colors, View, Tooltip, Glyph, } from '../ui'; import React, {Component} from 'react'; +import {theme} from 'flipper-plugin'; export type SelectionType = 'multiple' | 'single'; @@ -62,7 +62,7 @@ const Container = styled(FlexColumn)({ }); const Line = styled(View)({ - backgroundColor: colors.greyTint2, + backgroundColor: theme.dividerColor, height: 1, width: 'auto', flexShrink: 0, @@ -71,7 +71,7 @@ const Line = styled(View)({ const RowComponentContainer = styled(FlexColumn)({ overflow: 'scroll', height: 'auto', - backgroundColor: colors.white, + backgroundColor: theme.backgroundDefault, maxHeight: 500, }); @@ -121,12 +121,14 @@ class RowComponent extends Component { paddingBottom={8} paddingLeft={leftPadding || 0}> - {label} + + {label} + {disabled && ( = ({children}) => ( - - {children} - + + + {children} + + ); export default CenteredView; diff --git a/desktop/app/src/ui/components/Markdown.tsx b/desktop/app/src/ui/components/Markdown.tsx index 7efdf500d..d291c1a8b 100644 --- a/desktop/app/src/ui/components/Markdown.tsx +++ b/desktop/app/src/ui/components/Markdown.tsx @@ -10,8 +10,7 @@ import React, {CSSProperties, ReactNode} from 'react'; import styled from '@emotion/styled'; import ReactMarkdown from 'react-markdown'; -import {colors} from './colors'; -import {getFlipperLib} from 'flipper-plugin'; +import {getFlipperLib, theme} from 'flipper-plugin'; const Container = styled.div({ padding: 10, @@ -25,7 +24,7 @@ const Heading = styled.div({fontSize: 18, marginTop: 10, marginBottom: 10}); const SubHeading = styled.div({ fontSize: 12, textTransform: 'uppercase', - color: '#90949c', + color: theme.textColorSecondary, marginTop: 10, marginBottom: 10, fontWeight: 'bold', @@ -37,23 +36,23 @@ const ListItem = styled.li({ }); const Strong = styled.span({ fontWeight: 'bold', - color: '#1d2129', + color: theme.textColorPrimary, }); const Emphasis = styled.span({ fontStyle: 'italic', }); const Quote = styled(Row)({ padding: 10, - backgroundColor: '#f1f2f3', + backgroundColor: theme.backgroundWash, fontSize: 13, }); const Code = styled.span({ fontFamily: '"Courier New", Courier, monospace', - backgroundColor: '#f1f2f3', + backgroundColor: theme.backgroundWash, }); const Pre = styled(Row)({ padding: 10, - backgroundColor: '#f1f2f3', + backgroundColor: theme.backgroundWash, }); function CodeBlock(props: { children: ReactNode[]; @@ -69,7 +68,7 @@ function CodeBlock(props: { ); } const Link = styled.span({ - color: colors.blue, + color: theme.textColorActive, }); function LinkReference(props: {href: string; children: Array}) { return ( diff --git a/desktop/app/src/ui/components/MultiLineInput.tsx b/desktop/app/src/ui/components/MultiLineInput.tsx index b5d8f57d2..704a251f5 100644 --- a/desktop/app/src/ui/components/MultiLineInput.tsx +++ b/desktop/app/src/ui/components/MultiLineInput.tsx @@ -8,20 +8,21 @@ */ import styled from '@emotion/styled'; -import {colors} from './colors'; +import {theme} from 'flipper-plugin'; export const multilineStyle = (props: {valid: boolean}) => ({ - border: `1px solid ${props.valid === false ? colors.red : colors.light15}`, + border: `1px solid ${ + props.valid === false ? theme.errorColor : theme.dividerColor + }`, borderRadius: 4, font: 'inherit', fontSize: '1em', height: '28px', lineHeight: '28px', marginRight: 5, - + backgroundColor: theme.backgroundDefault, '&:disabled': { - backgroundColor: '#ddd', - borderColor: '#ccc', + backgroundColor: theme.backgroundWash, cursor: 'not-allowed', }, }); diff --git a/desktop/app/src/ui/components/RoundedSection.tsx b/desktop/app/src/ui/components/RoundedSection.tsx index f2588dde6..ae933772c 100644 --- a/desktop/app/src/ui/components/RoundedSection.tsx +++ b/desktop/app/src/ui/components/RoundedSection.tsx @@ -9,24 +9,23 @@ import React from 'react'; import styled from '@emotion/styled'; -import {colors} from './colors'; -import Heading from './Heading'; -import FlexColumn from './FlexColumn'; +import {theme, Layout} from 'flipper-plugin'; +import {Typography} from 'antd'; const Divider = styled.hr({ margin: '16px -20px 20px -20px', border: 'none', - borderTop: `1px solid ${colors.light05}`, + borderTop: `1px solid ${theme.dividerColor}`, }); Divider.displayName = 'RoundedSection:Divider'; const Container = styled.div({ - background: colors.white, - borderRadius: 10, - boxShadow: '0 1px 3px rgba(0,0,0,0.25)', - marginBottom: '20px', + background: theme.backgroundDefault, + borderRadius: theme.space.medium, + boxShadow: `0 1px 3px ${theme.dividerColor}`, + marginBottom: theme.space.large, width: '100%', - padding: 20, + padding: theme.space.large, }); Container.displayName = 'RoundedSection:Container'; @@ -37,9 +36,9 @@ Container.displayName = 'RoundedSection:Container'; */ const RoundedSection: React.FC<{title: string}> = ({title, children}) => ( - {title} + {title} - {children} + {children} );