Skip to content

Commit

Permalink
fix: revert last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Nov 27, 2023
1 parent b6c2a4e commit 744c881
Showing 1 changed file with 30 additions and 32 deletions.
62 changes: 30 additions & 32 deletions src/components/Onfido/BaseOnfidoWeb.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import useLocalize from '@hooks/useLocalize';
import Log from '@libs/Log';
import fontFamily from '@styles/fontFamily';
import fontWeightBold from '@styles/fontWeight/bold';
import themeColors from '@styles/themes/default';
import variables from '@styles/variables';
import useTheme from "@styles/themes/useTheme";
import CONST from '@src/CONST';
import './index.css';
import onfidoPropTypes from './onfidoPropTypes';

function initializeOnfido({sdkToken, onSuccess, onError, onUserExit, preferredLocale, translate, theme}) {
function initializeOnfido({sdkToken, onSuccess, onError, onUserExit, preferredLocale, translate}) {
OnfidoSDK.init({
token: sdkToken,
containerId: CONST.ONFIDO.CONTAINER_ID,
Expand All @@ -25,35 +25,35 @@ function initializeOnfido({sdkToken, onSuccess, onError, onUserExit, preferredLo
fontWeightTitle: fontWeightBold,
fontWeightSubtitle: 400,
fontSizeSubtitle: `${variables.fontSizeNormal}px`,
colorContentTitle: theme.text,
colorContentSubtitle: theme.text,
colorContentBody: theme.text,
colorContentTitle: themeColors.text,
colorContentSubtitle: themeColors.text,
colorContentBody: themeColors.text,
borderRadiusButton: `${variables.buttonBorderRadius}px`,
colorBackgroundSurfaceModal: theme.appBG,
colorBorderDocTypeButton: theme.border,
colorBorderDocTypeButtonHover: theme.transparent,
colorBorderButtonPrimaryHover: theme.transparent,
colorBackgroundButtonPrimary: theme.success,
colorBackgroundButtonPrimaryHover: theme.successHover,
colorBackgroundButtonPrimaryActive: theme.successHover,
colorBorderButtonPrimary: theme.success,
colorContentButtonSecondaryText: theme.text,
colorBackgroundButtonSecondary: theme.border,
colorBackgroundButtonSecondaryHover: theme.icon,
colorBackgroundButtonSecondaryActive: theme.icon,
colorBorderButtonSecondary: theme.border,
colorBackgroundIcon: theme.transparent,
colorContentLinkTextHover: theme.appBG,
colorBorderLinkUnderline: theme.link,
colorBackgroundLinkHover: theme.link,
colorBackgroundLinkActive: theme.link,
authAccentColor: theme.link,
colorBackgroundInfoPill: theme.link,
colorBackgroundSelector: theme.appBG,
colorBackgroundDocTypeButton: theme.success,
colorBackgroundDocTypeButtonHover: theme.successHover,
colorBackgroundButtonIconHover: theme.transparent,
colorBackgroundButtonIconActive: theme.transparent,
colorBackgroundSurfaceModal: themeColors.appBG,
colorBorderDocTypeButton: themeColors.border,
colorBorderDocTypeButtonHover: themeColors.transparent,
colorBorderButtonPrimaryHover: themeColors.transparent,
colorBackgroundButtonPrimary: themeColors.success,
colorBackgroundButtonPrimaryHover: themeColors.successHover,
colorBackgroundButtonPrimaryActive: themeColors.successHover,
colorBorderButtonPrimary: themeColors.success,
colorContentButtonSecondaryText: themeColors.text,
colorBackgroundButtonSecondary: themeColors.border,
colorBackgroundButtonSecondaryHover: themeColors.icon,
colorBackgroundButtonSecondaryActive: themeColors.icon,
colorBorderButtonSecondary: themeColors.border,
colorBackgroundIcon: themeColors.transparent,
colorContentLinkTextHover: themeColors.appBG,
colorBorderLinkUnderline: themeColors.link,
colorBackgroundLinkHover: themeColors.link,
colorBackgroundLinkActive: themeColors.link,
authAccentColor: themeColors.link,
colorBackgroundInfoPill: themeColors.link,
colorBackgroundSelector: themeColors.appBG,
colorBackgroundDocTypeButton: themeColors.success,
colorBackgroundDocTypeButtonHover: themeColors.successHover,
colorBackgroundButtonIconHover: themeColors.transparent,
colorBackgroundButtonIconActive: themeColors.transparent,
},
steps: [
{
Expand Down Expand Up @@ -120,7 +120,6 @@ function logOnFidoEvent(event) {

const Onfido = forwardRef((props, ref) => {
const {preferredLocale, translate} = useLocalize();
const theme = useTheme();

useEffect(() => {
initializeOnfido({
Expand All @@ -130,7 +129,6 @@ const Onfido = forwardRef((props, ref) => {
onUserExit: props.onUserExit,
preferredLocale,
translate,
theme,
});

window.addEventListener('userAnalyticsEvent', logOnFidoEvent);
Expand Down

0 comments on commit 744c881

Please sign in to comment.