diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2020-11-04 20:47:52 +0100 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2020-11-16 09:23:09 +0100 |
| commit | 2ee7b754aa437af74cb4007cd56155fbdd7ba9ff (patch) | |
| tree | bd07f757e5bf8ab219a87140b3e23b4c5d1b0695 /gui/src/renderer/components/CellStyles.tsx | |
| parent | e10bf00f5cc1d3339402f169df5f0ee37487f771 (diff) | |
| download | mullvadvpn-2ee7b754aa437af74cb4007cd56155fbdd7ba9ff.tar.xz mullvadvpn-2ee7b754aa437af74cb4007cd56155fbdd7ba9ff.zip | |
Move Cell components to dedicated directory
Diffstat (limited to 'gui/src/renderer/components/CellStyles.tsx')
| -rw-r--r-- | gui/src/renderer/components/CellStyles.tsx | 132 |
1 files changed, 0 insertions, 132 deletions
diff --git a/gui/src/renderer/components/CellStyles.tsx b/gui/src/renderer/components/CellStyles.tsx deleted file mode 100644 index 2bbfd5b928..0000000000 --- a/gui/src/renderer/components/CellStyles.tsx +++ /dev/null @@ -1,132 +0,0 @@ -import React from 'react'; -import styled from 'styled-components'; -import { colors } from '../../config.json'; -import { buttonText, mediumText, smallText } from './common-styles'; -import ImageView, { IImageViewProps } from './ImageView'; - -export const StyledContainer = styled.div({ - display: 'flex', - backgroundColor: colors.blue, - alignItems: 'center', - paddingLeft: '22px', - paddingRight: '16px', -}); - -export const StyledSection = styled.div({ - display: 'flex', - flexDirection: 'column', -}); - -export const StyledSectionTitle = styled.span(buttonText, { - backgroundColor: colors.blue, - padding: '14px 16px 14px 22px', - marginBottom: '1px', -}); - -interface IStyledCellButtonProps { - selected?: boolean; - containedInSection: boolean; -} - -export const StyledCellButton = styled.button({}, (props: IStyledCellButtonProps) => ({ - display: 'flex', - padding: '0 16px 0 22px', - marginBottom: '1px', - flex: 1, - alignItems: 'center', - alignContent: 'center', - cursor: 'default', - border: 'none', - backgroundColor: props.selected - ? colors.green - : props.containedInSection - ? colors.blue40 - : colors.blue, - ':not(:disabled):hover': { - backgroundColor: props.selected ? colors.green : colors.blue80, - }, -})); - -export const StyledLabel = styled.div(buttonText, (props: { disabled: boolean }) => ({ - margin: '14px 0', - flex: 1, - color: props.disabled ? colors.white40 : colors.white, - textAlign: 'left', -})); - -export const StyledSubText = styled.span(smallText, (props: { disabled: boolean }) => ({ - color: props.disabled ? colors.white20 : colors.white60, - fontWeight: 800, - flex: -1, - textAlign: 'right', - marginLeft: '8px', - marginRight: '8px', -})); - -export const StyledTintedIcon = styled(ImageView).attrs((props: IImageViewProps) => ({ - tintColor: props.tintColor ?? colors.white60, - tintHoverColor: props.tintHoverColor ?? props.tintColor ?? colors.white60, -}))((props: IImageViewProps) => ({ - [StyledCellButton + ':hover &']: { - backgroundColor: props.tintHoverColor, - }, -})); - -export const StyledFooter = styled.div({ - padding: '6px 22px 20px', -}); - -export const StyledFooterText = styled.span(smallText); - -export const StyledFooterBoldText = styled(StyledFooterText)({ - fontWeight: 900, -}); - -export const StyledInputFrame = styled.div({ - flexGrow: 0, - backgroundColor: 'rgba(255,255,255,0.1)', - borderRadius: '4px', - padding: '4px 8px', -}); - -const inputTextStyles: React.CSSProperties = { - ...mediumText, - fontWeight: 600, - height: '28px', - textAlign: 'right', - padding: '0px', -}; - -export const StyledInput = styled.input({}, (props: { valid?: boolean }) => ({ - ...inputTextStyles, - backgroundColor: 'transparent', - border: 'none', - width: '100%', - height: '100%', - color: props.valid !== false ? colors.white : colors.red, - '::placeholder': { - color: colors.white60, - }, -})); - -export const StyledAutoSizingTextInputContainer = styled.div({ - position: 'relative', -}); - -export const StyledAutoSizingTextInputFiller = styled.pre({ - ...inputTextStyles, - minWidth: '80px', - color: 'transparent', -}); - -export const StyledAutoSizingTextInputWrapper = styled.div({ - position: 'absolute', - top: '0px', - left: '0px', - width: '100%', - height: '100%', -}); - -export const StyledIconContainer = styled.div((props: { disabled: boolean }) => ({ - opacity: props.disabled ? 0.4 : 1, -})); |
