Refactor portal specific colors out of react-shared
This commit is contained in:
@@ -1,4 +1,12 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"changes": [
|
||||||
|
{
|
||||||
|
"note": "Removed portal specific colors"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"timestamp": 1525477860,
|
"timestamp": 1525477860,
|
||||||
"version": "0.1.6",
|
"version": "0.1.6",
|
||||||
|
|||||||
@@ -48,20 +48,7 @@ const baseColors = {
|
|||||||
darkYellow: '#caca03',
|
darkYellow: '#caca03',
|
||||||
};
|
};
|
||||||
|
|
||||||
const appColors = {
|
|
||||||
// wallet specific colors
|
|
||||||
walletBoxShadow: 'rgba(56, 59, 137, 0.2)',
|
|
||||||
walletBorder: '#ededee',
|
|
||||||
walletDefaultItemBackground: '#fbfbfc',
|
|
||||||
walletFocusedItemBackground: '#f0f1f4',
|
|
||||||
allowanceToggleShadow: 'rgba(0, 0, 0, 0)',
|
|
||||||
allowanceToggleOffTrack: '#adadad',
|
|
||||||
allowanceToggleOnTrack: baseColors.mediumBlue,
|
|
||||||
wrapEtherConfirmationButton: baseColors.mediumBlue,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const colors = {
|
export const colors = {
|
||||||
...materialUiColors,
|
...materialUiColors,
|
||||||
...baseColors,
|
...baseColors,
|
||||||
...appColors,
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { colors, constants as sharedConstants, Styles } from '@0xproject/react-shared';
|
import { constants as sharedConstants, Styles } from '@0xproject/react-shared';
|
||||||
import { BigNumber, logUtils } from '@0xproject/utils';
|
import { BigNumber, logUtils } from '@0xproject/utils';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import Toggle from 'material-ui/Toggle';
|
import Toggle from 'material-ui/Toggle';
|
||||||
@@ -7,6 +7,7 @@ import { Blockchain } from 'ts/blockchain';
|
|||||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||||
import { BalanceErrs, Token, TokenState } from 'ts/types';
|
import { BalanceErrs, Token, TokenState } from 'ts/types';
|
||||||
import { analytics } from 'ts/utils/analytics';
|
import { analytics } from 'ts/utils/analytics';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
import { constants } from 'ts/utils/constants';
|
import { constants } from 'ts/utils/constants';
|
||||||
import { errorReporter } from 'ts/utils/error_reporter';
|
import { errorReporter } from 'ts/utils/error_reporter';
|
||||||
import { utils } from 'ts/utils/utils';
|
import { utils } from 'ts/utils/utils';
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
|
|
||||||
export interface BackButtonProps {
|
export interface BackButtonProps {
|
||||||
to: string;
|
to: string;
|
||||||
labelText: string;
|
labelText: string;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import { GridTile } from 'material-ui/GridList';
|
import { GridTile } from 'material-ui/GridList';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
@@ -6,6 +6,7 @@ import * as React from 'react';
|
|||||||
import { TopTokens } from 'ts/components/relayer_index/relayer_top_tokens';
|
import { TopTokens } from 'ts/components/relayer_index/relayer_top_tokens';
|
||||||
import { TokenIcon } from 'ts/components/ui/token_icon';
|
import { TokenIcon } from 'ts/components/ui/token_icon';
|
||||||
import { Token, WebsiteBackendRelayerInfo } from 'ts/types';
|
import { Token, WebsiteBackendRelayerInfo } from 'ts/types';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
|
|
||||||
export interface RelayerGridTileProps {
|
export interface RelayerGridTileProps {
|
||||||
relayerInfo: WebsiteBackendRelayerInfo;
|
relayerInfo: WebsiteBackendRelayerInfo;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import CircularProgress from 'material-ui/CircularProgress';
|
import CircularProgress from 'material-ui/CircularProgress';
|
||||||
import FlatButton from 'material-ui/FlatButton';
|
import FlatButton from 'material-ui/FlatButton';
|
||||||
@@ -8,6 +8,7 @@ import * as React from 'react';
|
|||||||
import { RelayerGridTile } from 'ts/components/relayer_index/relayer_grid_tile';
|
import { RelayerGridTile } from 'ts/components/relayer_index/relayer_grid_tile';
|
||||||
import { ScreenWidths, WebsiteBackendRelayerInfo } from 'ts/types';
|
import { ScreenWidths, WebsiteBackendRelayerInfo } from 'ts/types';
|
||||||
import { backendClient } from 'ts/utils/backend_client';
|
import { backendClient } from 'ts/utils/backend_client';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
|
|
||||||
export interface RelayerIndexProps {
|
export interface RelayerIndexProps {
|
||||||
networkId: number;
|
networkId: number;
|
||||||
|
|||||||
@@ -1,13 +1,15 @@
|
|||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import RaisedButton from 'material-ui/RaisedButton';
|
import RaisedButton from 'material-ui/RaisedButton';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { Blockchain } from 'ts/blockchain';
|
import { Blockchain } from 'ts/blockchain';
|
||||||
import { ProviderPicker } from 'ts/components/top_bar/provider_picker';
|
import { ProviderPicker } from 'ts/components/top_bar/provider_picker';
|
||||||
import { DropDown } from 'ts/components/ui/drop_down';
|
import { DropDown } from 'ts/components/ui/drop_down';
|
||||||
import { Identicon } from 'ts/components/ui/identicon';
|
import { Identicon } from 'ts/components/ui/identicon';
|
||||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||||
import { ProviderType } from 'ts/types';
|
import { ProviderType } from 'ts/types';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
import { constants } from 'ts/utils/constants';
|
import { constants } from 'ts/utils/constants';
|
||||||
import { utils } from 'ts/utils/utils';
|
import { utils } from 'ts/utils/utils';
|
||||||
|
|
||||||
@@ -41,9 +43,7 @@ export class ProviderDisplay extends React.Component<ProviderDisplayProps, Provi
|
|||||||
this.props.providerType === ProviderType.Injected && this.props.injectedProviderName !== '0x Public';
|
this.props.providerType === ProviderType.Injected && this.props.injectedProviderName !== '0x Public';
|
||||||
const displayAddress = isAddressAvailable
|
const displayAddress = isAddressAvailable
|
||||||
? utils.getAddressBeginAndEnd(this.props.userAddress)
|
? utils.getAddressBeginAndEnd(this.props.userAddress)
|
||||||
: isExternallyInjectedProvider
|
: isExternallyInjectedProvider ? 'Account locked' : '0x0000...0000';
|
||||||
? 'Account locked'
|
|
||||||
: '0x0000...0000';
|
|
||||||
// If the "injected" provider is our fallback public node, then we want to
|
// If the "injected" provider is our fallback public node, then we want to
|
||||||
// show the "connect a wallet" message instead of the providerName
|
// show the "connect a wallet" message instead of the providerName
|
||||||
const injectedProviderName = isExternallyInjectedProvider
|
const injectedProviderName = isExternallyInjectedProvider
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { ZeroEx } from '0x.js';
|
import { ZeroEx } from '0x.js';
|
||||||
import {
|
import {
|
||||||
colors,
|
|
||||||
constants as sharedConstants,
|
constants as sharedConstants,
|
||||||
EtherscanLinkSuffixes,
|
EtherscanLinkSuffixes,
|
||||||
Styles,
|
Styles,
|
||||||
@@ -42,6 +41,7 @@ import {
|
|||||||
WebsitePaths,
|
WebsitePaths,
|
||||||
} from 'ts/types';
|
} from 'ts/types';
|
||||||
import { backendClient } from 'ts/utils/backend_client';
|
import { backendClient } from 'ts/utils/backend_client';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
import { constants } from 'ts/utils/constants';
|
import { constants } from 'ts/utils/constants';
|
||||||
import { utils } from 'ts/utils/utils';
|
import { utils } from 'ts/utils/utils';
|
||||||
import { styles as walletItemStyles } from 'ts/utils/wallet_item_styles';
|
import { styles as walletItemStyles } from 'ts/utils/wallet_item_styles';
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
import FlatButton from 'material-ui/FlatButton';
|
import FlatButton from 'material-ui/FlatButton';
|
||||||
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
|
import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
|
|
||||||
import { ProviderType } from 'ts/types';
|
import { ProviderType } from 'ts/types';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
import { constants } from 'ts/utils/constants';
|
import { constants } from 'ts/utils/constants';
|
||||||
|
|
||||||
export interface WalletDisconnectedItemProps {
|
export interface WalletDisconnectedItemProps {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ZeroEx } from '0x.js';
|
import { ZeroEx } from '0x.js';
|
||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
import { BigNumber, logUtils } from '@0xproject/utils';
|
import { BigNumber, logUtils } from '@0xproject/utils';
|
||||||
import * as _ from 'lodash';
|
import * as _ from 'lodash';
|
||||||
import FlatButton from 'material-ui/FlatButton';
|
import FlatButton from 'material-ui/FlatButton';
|
||||||
@@ -11,6 +11,7 @@ import { EthAmountInput } from 'ts/components/inputs/eth_amount_input';
|
|||||||
import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
|
import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
|
||||||
import { Dispatcher } from 'ts/redux/dispatcher';
|
import { Dispatcher } from 'ts/redux/dispatcher';
|
||||||
import { BlockchainCallErrs, Side, Token } from 'ts/types';
|
import { BlockchainCallErrs, Side, Token } from 'ts/types';
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
import { constants } from 'ts/utils/constants';
|
import { constants } from 'ts/utils/constants';
|
||||||
import { errorReporter } from 'ts/utils/error_reporter';
|
import { errorReporter } from 'ts/utils/error_reporter';
|
||||||
import { utils } from 'ts/utils/utils';
|
import { utils } from 'ts/utils/utils';
|
||||||
|
|||||||
17
packages/website/ts/utils/colors.ts
Normal file
17
packages/website/ts/utils/colors.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { colors as sharedColors } from '@0xproject/react-shared';
|
||||||
|
|
||||||
|
const appColors = {
|
||||||
|
walletBoxShadow: 'rgba(56, 59, 137, 0.2)',
|
||||||
|
walletBorder: '#ededee',
|
||||||
|
walletDefaultItemBackground: '#fbfbfc',
|
||||||
|
walletFocusedItemBackground: '#f0f1f4',
|
||||||
|
allowanceToggleShadow: 'rgba(0, 0, 0, 0)',
|
||||||
|
allowanceToggleOffTrack: '#adadad',
|
||||||
|
allowanceToggleOnTrack: sharedColors.mediumBlue,
|
||||||
|
wrapEtherConfirmationButton: sharedColors.mediumBlue,
|
||||||
|
};
|
||||||
|
|
||||||
|
export const colors = {
|
||||||
|
...sharedColors,
|
||||||
|
...appColors,
|
||||||
|
};
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
import { colors, Styles } from '@0xproject/react-shared';
|
import { Styles } from '@0xproject/react-shared';
|
||||||
|
|
||||||
|
import { colors } from 'ts/utils/colors';
|
||||||
|
|
||||||
export const styles: Styles = {
|
export const styles: Styles = {
|
||||||
focusedItem: {
|
focusedItem: {
|
||||||
|
|||||||
Reference in New Issue
Block a user