diff --git a/app/App.js b/app/App.js index 0c3a07a9c5..c3ac56da90 100644 --- a/app/App.js +++ b/app/App.js @@ -1,7 +1,7 @@ // @flow import React, { Component } from 'react'; import { observer } from 'mobx-react'; -import { ThemeProvider } from 'react-css-themr'; +import { ThemeProvider } from 'react-polymorph/lib/components/ThemeProvider'; import { Router } from 'react-router-dom'; import { addLocaleData, IntlProvider } from 'react-intl'; import en from 'react-intl/locale-data/en'; @@ -11,6 +11,7 @@ import zh from 'react-intl/locale-data/zh'; import ru from 'react-intl/locale-data/ru'; import { Routes } from './Routes'; import { yoroiTheme } from './themes/yoroi'; +import { themeOverrides } from './themes/overrides/index'; import translations from './i18n/translations'; import type { StoresMap } from './stores/index'; import type { ActionsMap } from './actions/index'; @@ -48,15 +49,15 @@ class App extends Component<{ const mergedMessages = Object.assign({}, translations['en-US'], translations[locale]); const currentTheme = 'yoroi'; - const theme = require(`./themes/prebuilt/${currentTheme}.js`); // eslint-disable-line + const themeVars = require(`./themes/prebuilt/${currentTheme}.js`); // eslint-disable-line const mobxDevTools = this.mobxDevToolsInstanceIfDevEnv(); return (
- + {/* Automatically pass a theme prop to all componenets in this subtree. */} - + {Routes(stores, actions)} diff --git a/app/Routes.js b/app/Routes.js index 97f1b9630f..32bb74712a 100644 --- a/app/Routes.js +++ b/app/Routes.js @@ -72,7 +72,7 @@ export const Routes = ( {SettingsSubpages(stores, actions)} - )} + )} /> { className={styles.languageSelect} options={languageOptions} {...languageId.bind()} - skin={} + skin={SelectSkin} /> {error &&

{intl.formatMessage(error)}

} @@ -96,7 +96,7 @@ export default class LanguageSelectionForm extends Component { className={buttonClasses} label={intl.formatMessage(messages.submitLabel)} onMouseUp={this.submit} - skin={} + skin={ButtonSkin} />
diff --git a/app/components/profile/terms-of-use/TermsOfUseForm.js b/app/components/profile/terms-of-use/TermsOfUseForm.js index 9f8598c426..70685c6595 100644 --- a/app/components/profile/terms-of-use/TermsOfUseForm.js +++ b/app/components/profile/terms-of-use/TermsOfUseForm.js @@ -2,11 +2,11 @@ import React, { Component } from 'react'; import classnames from 'classnames'; import { observer } from 'mobx-react'; -import Button from 'react-polymorph/lib/components/Button'; -import SimpleButtonSkin from 'react-polymorph/lib/skins/simple/raw/ButtonSkin'; +import { Button } from 'react-polymorph/lib/components/Button'; +import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin'; import { defineMessages, intlShape } from 'react-intl'; -import Checkbox from 'react-polymorph/lib/components/Checkbox'; -import SimpleCheckboxSkin from 'react-polymorph/lib/skins/simple/raw/CheckboxSkin'; +import { Checkbox } from 'react-polymorph/lib/components/Checkbox'; +import { CheckboxSkin } from 'react-polymorph/lib/skins/simple/CheckboxSkin'; import LocalizableError from '../../../i18n/LocalizableError'; import TermsOfUseText from './TermsOfUseText'; import styles from './TermsOfUseForm.scss'; @@ -79,7 +79,7 @@ export default class TermsOfUseForm extends Component { label={intl.formatMessage(messages[checkboxLabel])} onChange={this.toggleAcceptance.bind(this)} checked={areTermsOfUseAccepted} - skin={} + skin={CheckboxSkin} /> @@ -90,7 +90,7 @@ export default class TermsOfUseForm extends Component { label={intl.formatMessage(messages.submitLabel)} onMouseUp={this.submit} disabled={!areTermsOfUseAccepted} - skin={} + skin={ButtonSkin} /> diff --git a/app/components/settings/categories/GeneralSettings.js b/app/components/settings/categories/GeneralSettings.js index 9a33dec385..2a42335359 100644 --- a/app/components/settings/categories/GeneralSettings.js +++ b/app/components/settings/categories/GeneralSettings.js @@ -2,8 +2,8 @@ import React, { Component } from 'react'; import { observer } from 'mobx-react'; import classNames from 'classnames'; -import Select from 'react-polymorph/lib/components/Select'; -import SelectSkin from 'react-polymorph/lib/skins/simple/raw/SelectSkin'; +import { Select } from 'react-polymorph/lib/components/Select'; +import { SelectSkin } from 'react-polymorph/lib/skins/simple/SelectSkin'; import { defineMessages, intlShape } from 'react-intl'; import ReactToolboxMobxForm from '../../../utils/ReactToolboxMobxForm'; import LocalizableError from '../../../i18n/LocalizableError'; @@ -75,7 +75,7 @@ export default class GeneralSettings extends Component { options={languageOptions} {...languageId.bind()} onChange={this.selectLanguage} - skin={} + skin={SelectSkin} /> {error &&

{error}

} diff --git a/app/components/transfer/ErrorPage.js b/app/components/transfer/ErrorPage.js index 645fbc0897..9826a25f06 100644 --- a/app/components/transfer/ErrorPage.js +++ b/app/components/transfer/ErrorPage.js @@ -3,8 +3,8 @@ import React, { Component } from 'react'; import { observer } from 'mobx-react'; import classnames from 'classnames'; import { intlShape } from 'react-intl'; -import Button from 'react-polymorph/lib/components/Button'; -import SimpleButtonSkin from 'react-polymorph/lib/skins/simple/raw/ButtonSkin'; +import { Button } from 'react-polymorph/lib/components/Button'; +import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin'; import LocalizableError from '../../i18n/LocalizableError'; import styles from './ErrorPage.scss'; @@ -50,7 +50,7 @@ export default class ErrorPage extends Component { className={backButtonClasses} label={backButtonLabel} onClick={onCancel} - skin={} + skin={ButtonSkin} /> diff --git a/app/components/transfer/TransferInstructionsPage.js b/app/components/transfer/TransferInstructionsPage.js index 05280edfb8..fe1f3fedca 100644 --- a/app/components/transfer/TransferInstructionsPage.js +++ b/app/components/transfer/TransferInstructionsPage.js @@ -2,8 +2,8 @@ import React, { Component } from 'react'; import { observer } from 'mobx-react'; import classnames from 'classnames'; -import Button from 'react-polymorph/lib/components/Button'; -import SimpleButtonSkin from 'react-polymorph/lib/skins/simple/raw/ButtonSkin'; +import { Button } from 'react-polymorph/lib/components/Button'; +import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin'; import { defineMessages, intlShape } from 'react-intl'; import BorderedBox from '../widgets/BorderedBox'; import globalMessages from '../../i18n/global-messages'; @@ -94,7 +94,7 @@ export default class TransferInstructionsPage extends Component { label={intl.formatMessage(messages.instructionsButton)} onClick={onFollowInstructionsPrerequisites} disabled={!disableTransferFunds} - skin={} + skin={ButtonSkin} /> @@ -123,7 +123,7 @@ export default class TransferInstructionsPage extends Component { label={confirmationText} onClick={onConfirm} disabled={disableTransferFunds} - skin={} + skin={ButtonSkin} /> diff --git a/app/components/transfer/TransferMnemonicPage.js b/app/components/transfer/TransferMnemonicPage.js index 44d165a673..58f35a33e6 100644 --- a/app/components/transfer/TransferMnemonicPage.js +++ b/app/components/transfer/TransferMnemonicPage.js @@ -3,10 +3,10 @@ import React, { Component } from 'react'; import { join } from 'lodash'; import { observer } from 'mobx-react'; import classnames from 'classnames'; -import Autocomplete from 'react-polymorph/lib/components/Autocomplete'; -import SimpleAutocompleteSkin from 'react-polymorph/lib/skins/simple/raw/AutocompleteSkin'; -import Button from 'react-polymorph/lib/components/Button'; -import SimpleButtonSkin from 'react-polymorph/lib/skins/simple/raw/ButtonSkin'; +import { Autocomplete } from 'react-polymorph/lib/components/Autocomplete'; +import { AutocompleteSkin } from 'react-polymorph/lib/skins/simple/AutocompleteSkin'; +import { Button } from 'react-polymorph/lib/components/Button'; +import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin'; import { defineMessages, intlShape } from 'react-intl'; import ReactToolboxMobxForm from '../../utils/ReactToolboxMobxForm'; import BorderedBox from '../widgets/BorderedBox'; @@ -157,7 +157,7 @@ export default class TransferMnemonicPage extends Component { error={recoveryPhraseField.error} maxVisibleOptions={5} noResultsMessage={intl.formatMessage(messages.recoveryPhraseNoResults)} - skin={} + skin={AutocompleteSkin} />
@@ -165,14 +165,14 @@ export default class TransferMnemonicPage extends Component { className={nextButtonClasses} label={intl.formatMessage(messages.nextButtonLabel)} onClick={this.submit} - skin={} + skin={ButtonSkin} />
diff --git a/app/components/transfer/TransferSummaryPage.js b/app/components/transfer/TransferSummaryPage.js index c97430c5d6..677e8b880c 100644 --- a/app/components/transfer/TransferSummaryPage.js +++ b/app/components/transfer/TransferSummaryPage.js @@ -2,8 +2,8 @@ import React, { Component } from 'react'; import { observer } from 'mobx-react'; import classnames from 'classnames'; -import Button from 'react-polymorph/lib/components/Button'; -import SimpleButtonSkin from 'react-polymorph/lib/skins/simple/raw/ButtonSkin'; +import { Button } from 'react-polymorph/lib/components/Button'; +import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin'; import { defineMessages, intlShape } from 'react-intl'; import BorderedBox from '../widgets/BorderedBox'; import styles from './TransferSummaryPage.scss'; @@ -166,7 +166,7 @@ export default class TransferSummaryPage extends Component { label={intl.formatMessage(messages.cancelTransferButtonLabel)} onClick={this.props.onCancel} disabled={isSubmitting} - skin={} + skin={ButtonSkin} />