diff --git a/ts/components/basic/SessionButton.tsx b/ts/components/basic/SessionButton.tsx index b113c64a2..fd131db5f 100644 --- a/ts/components/basic/SessionButton.tsx +++ b/ts/components/basic/SessionButton.tsx @@ -6,11 +6,13 @@ export enum SessionButtonType { Outline = 'outline', Simple = 'simple', Solid = 'solid', + ModalConfirm = 'modal-confirm', } export enum SessionButtonShape { Round = 'round', Square = 'square', + None = 'none', } // NOTE References ts/themes/colors.tsx @@ -33,7 +35,7 @@ const StyledButton = styled.div<{ buttonType: SessionButtonType; buttonShape: SessionButtonShape; }>` - width: auto; + width: ${props => (props.buttonType === SessionButtonType.ModalConfirm ? '100%' : 'auto')}; display: flex; justify-content: center; align-items: center; @@ -45,8 +47,9 @@ const StyledButton = styled.div<{ transition: var(--default-duration); background-repeat: no-repeat; overflow: hidden; - height: 34px; - padding: 0px 18px; + height: ${props => (props.buttonType === SessionButtonType.ModalConfirm ? undefined : '34px')}; + padding: ${props => + props.buttonType === SessionButtonType.ModalConfirm ? '16px 24px 24px' : '0px 18px'}; background-color: ${props => props.buttonType === SessionButtonType.Solid && props.color ? `var(--${props.color}-color)` @@ -65,7 +68,12 @@ const StyledButton = styled.div<{ ${props => props.buttonType === SessionButtonType.Solid && 'box-shadow: 0px 0px 6px var(--button-solid-shadow-color);'} - border-radius: ${props => (props.buttonShape === SessionButtonShape.Round ? '17px' : '6px')}; + border-radius: ${props => + props.buttonShape === SessionButtonShape.Round + ? '17px' + : props.buttonShape === SessionButtonShape.Square + ? '6px' + : '0px'}; .session-icon { fill: var(--background-primary-color); diff --git a/ts/components/dialog/TermsOfServicePrivacyDialog.tsx b/ts/components/dialog/TermsOfServicePrivacyDialog.tsx index 018c52efe..2f02aba81 100644 --- a/ts/components/dialog/TermsOfServicePrivacyDialog.tsx +++ b/ts/components/dialog/TermsOfServicePrivacyDialog.tsx @@ -1,8 +1,16 @@ import { noop } from 'lodash'; import { useDispatch } from 'react-redux'; -import { updateTermsOfServicePrivacyModal } from '../../state/ducks/modalDialog'; +import styled from 'styled-components'; +import { updateTermsOfServicePrivacyModal } from '../../state/onboarding/ducks/modals'; import { SessionWrapperModal } from '../SessionWrapperModal'; +import { Flex } from '../basic/Flex'; import { SessionButton, SessionButtonShape, SessionButtonType } from '../basic/SessionButton'; +import { SpacerSM } from '../basic/Text'; + +// NOTE we want to bypass the padding on the modal body so the buttons take up the full space +const ConfirmButtonContainer = styled(Flex)` + margin: 0px calc(var(--margins-lg) * -1) calc(var(--margins-lg) * -1) calc(var(--margins-lg) * -1); +`; export type TermsOfServicePrivacyDialogProps = { show: boolean; @@ -21,33 +29,33 @@ export function TermsOfServicePrivacyDialog(props: TermsOfServicePrivacyDialogPr return null; } - // TODO[epic=ses-900] need to add redux context to initial screens... or at the very least, a separate onboarding redux state return (
- {window.i18n('urlOpenBrowser')} - -
+ {window.i18n('urlOpenBrowser')} + + -
+
); diff --git a/ts/themes/classicDark.ts b/ts/themes/classicDark.ts index 323ebcb03..8c0f2a2f6 100644 --- a/ts/themes/classicDark.ts +++ b/ts/themes/classicDark.ts @@ -58,6 +58,10 @@ export const classicDark: ThemeColorVariables = { '--button-simple-text-color': 'var(--text-primary-color)', '--button-simple-disabled-color': 'var(--disabled-color)', + '--button-modal-confirm-background-color': 'none', + '--button-modal-confirm-background-hover-color': THEMES.CLASSIC_DARK.COLOR2, + '--button-modal-confirm-disabled-color': 'none', + '--button-icon-background-color': 'var(--transparent-color)', '--button-icon-stroke-color': 'var(--text-secondary-color)', '--button-icon-stroke-hover-color': 'var(--text-primary-color)', diff --git a/ts/themes/classicLight.ts b/ts/themes/classicLight.ts index 87584cd38..7542b5fa9 100644 --- a/ts/themes/classicLight.ts +++ b/ts/themes/classicLight.ts @@ -58,6 +58,10 @@ export const classicLight: ThemeColorVariables = { '--button-simple-text-color': 'var(--text-primary-color)', '--button-simple-disabled-color': 'var(--disabled-color)', + '--button-modal-confirm-background-color': 'none', + '--button-modal-confirm-background-hover-color': THEMES.CLASSIC_LIGHT.COLOR4, + '--button-modal-confirm-disabled-color': 'none', + '--button-icon-background-color': 'var(--transparent-color)', '--button-icon-stroke-color': 'var(--text-secondary-color)', '--button-icon-stroke-hover-color': 'var(--text-primary-color)', diff --git a/ts/themes/oceanDark.ts b/ts/themes/oceanDark.ts index 158c8d798..5c09a8e8b 100644 --- a/ts/themes/oceanDark.ts +++ b/ts/themes/oceanDark.ts @@ -58,6 +58,10 @@ export const oceanDark: ThemeColorVariables = { '--button-simple-text-color': 'var(--text-primary-color)', '--button-simple-disabled-color': 'var(--disabled-color)', + '--button-modal-confirm-background-color': 'none', + '--button-modal-confirm-background-hover-color': THEMES.OCEAN_DARK.COLOR6, + '--button-modal-confirm-disabled-color': 'none', + '--button-icon-background-color': 'var(--transparent-color)', '--button-icon-stroke-color': 'var(--text-secondary-color)', '--button-icon-stroke-hover-color': 'var(--text-primary-color)', diff --git a/ts/themes/oceanLight.ts b/ts/themes/oceanLight.ts index 96544f6df..d85dd08c5 100644 --- a/ts/themes/oceanLight.ts +++ b/ts/themes/oceanLight.ts @@ -58,6 +58,10 @@ export const oceanLight: ThemeColorVariables = { '--button-simple-text-color': 'var(--text-primary-color)', '--button-simple-disabled-color': 'var(--disabled-color)', + '--button-modal-confirm-background-color': 'none', + '--button-modal-confirm-background-hover-color': THEMES.OCEAN_LIGHT.COLOR6, + '--button-modal-confirm-disabled-color': 'none', + '--button-icon-background-color': 'var(--transparent-color)', '--button-icon-stroke-color': 'var(--text-secondary-color)', '--button-icon-stroke-hover-color': 'var(--text-primary-color)', diff --git a/ts/themes/variableColors.tsx b/ts/themes/variableColors.tsx index 79d317135..fbfa72fbc 100644 --- a/ts/themes/variableColors.tsx +++ b/ts/themes/variableColors.tsx @@ -70,6 +70,12 @@ export type ThemeColorVariables = { '--button-simple-text-color': string; '--button-simple-disabled-color': string; + /* Confirm */ + '--button-modal-confirm-background-color': string; + '--button-modal-confirm-background-hover-color': string; + /* Confirm buttons stay the same and rely on the disabled pointer */ + '--button-modal-confirm-disabled-color': string; + /* Icons */ '--button-icon-background-color': string; '--button-icon-stroke-color': string;