Merge pull request #1211 from 0xProject/chore/import-ui-directly
[instant] chore: Import UI components directly
This commit is contained in:
@@ -4,7 +4,7 @@ import { ColorOption } from '../style/theme';
|
||||
|
||||
import { Pulse } from './animations/pulse';
|
||||
|
||||
import { Text } from './ui';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
interface PlainPlaceholder {
|
||||
color: ColorOption;
|
||||
|
||||
@@ -12,7 +12,8 @@ import { balanceUtil } from '../util/balance';
|
||||
import { gasPriceEstimator } from '../util/gas_price_estimator';
|
||||
import { util } from '../util/util';
|
||||
|
||||
import { Button, Text } from './ui';
|
||||
import { Button } from './ui/button';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface BuyButtonProps {
|
||||
buyQuote?: BuyQuote;
|
||||
|
||||
@@ -3,7 +3,7 @@ import * as React from 'react';
|
||||
import { TimedProgressBar } from '../components/timed_progress_bar';
|
||||
|
||||
import { TimeCounter } from '../components/time_counter';
|
||||
import { Container } from '../components/ui';
|
||||
import { Container } from '../components/ui/container';
|
||||
import { OrderProcessState, OrderState } from '../types';
|
||||
|
||||
export interface BuyOrderProgressProps {
|
||||
|
||||
@@ -7,7 +7,10 @@ import { AffiliateInfo, OrderProcessState, ZeroExInstantError } from '../types';
|
||||
import { BuyButton } from './buy_button';
|
||||
import { PlacingOrderButton } from './placing_order_button';
|
||||
import { SecondaryButton } from './secondary_button';
|
||||
import { Button, Flex, Text } from './ui';
|
||||
|
||||
import { Button } from './ui/button';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface BuyOrderStateButtonProps {
|
||||
buyQuote?: BuyQuote;
|
||||
|
||||
@@ -8,7 +8,11 @@ import { assetUtils } from '../util/asset';
|
||||
import { util } from '../util/util';
|
||||
|
||||
import { ScalingAmountInput } from './scaling_amount_input';
|
||||
import { Container, Flex, Icon, Text } from './ui';
|
||||
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Icon } from './ui/icon';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
// Asset amounts only apply to ERC20 assets
|
||||
export interface ERC20AssetAmountInputProps {
|
||||
|
||||
@@ -6,7 +6,11 @@ import { ERC20Asset } from '../types';
|
||||
import { assetUtils } from '../util/asset';
|
||||
|
||||
import { SearchInput } from './search_input';
|
||||
import { Circle, Container, Flex, Text } from './ui';
|
||||
|
||||
import { Circle } from './ui/circle';
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface ERC20TokenSelectorProps {
|
||||
tokens: ERC20Asset[];
|
||||
|
||||
@@ -8,7 +8,11 @@ import { AsyncProcessState, ERC20Asset, OrderProcessState, OrderState } from '..
|
||||
import { format } from '../util/format';
|
||||
|
||||
import { AmountPlaceholder } from './amount_placeholder';
|
||||
import { Container, Flex, Icon, Spinner, Text } from './ui';
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Icon } from './ui/icon';
|
||||
import { Spinner } from './ui/spinner';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface InstantHeadingProps {
|
||||
selectedAssetAmount?: BigNumber;
|
||||
|
||||
@@ -8,7 +8,10 @@ import { ColorOption } from '../style/theme';
|
||||
import { format } from '../util/format';
|
||||
|
||||
import { AmountPlaceholder } from './amount_placeholder';
|
||||
import { Container, Flex, Text } from './ui';
|
||||
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface OrderDetailsProps {
|
||||
buyQuoteInfo?: BuyQuoteInfo;
|
||||
|
||||
@@ -2,7 +2,10 @@ import * as React from 'react';
|
||||
|
||||
import { ColorOption } from '../style/theme';
|
||||
|
||||
import { Button, Container, Spinner, Text } from './ui';
|
||||
import { Button } from './ui/button';
|
||||
import { Container } from './ui/container';
|
||||
import { Spinner } from './ui/spinner';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export const PlacingOrderButton: React.StatelessComponent<{}> = props => (
|
||||
<Button isDisabled={true} width="100%">
|
||||
|
||||
@@ -4,7 +4,7 @@ import * as React from 'react';
|
||||
import { ColorOption } from '../style/theme';
|
||||
import { util } from '../util/util';
|
||||
|
||||
import { Input } from './ui';
|
||||
import { Input } from './ui/input';
|
||||
|
||||
export enum ScalingInputPhase {
|
||||
FixedFontSize,
|
||||
|
||||
@@ -3,7 +3,10 @@ import * as React from 'react';
|
||||
|
||||
import { ColorOption } from '../style/theme';
|
||||
|
||||
import { Container, Flex, Icon, Input, InputProps } from './ui';
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Icon } from './ui/icon';
|
||||
import { Input, InputProps } from './ui/input';
|
||||
|
||||
export interface SearchInputProps extends InputProps {
|
||||
backgroundColor?: ColorOption;
|
||||
|
||||
@@ -3,7 +3,8 @@ import * as React from 'react';
|
||||
|
||||
import { ColorOption } from '../style/theme';
|
||||
|
||||
import { Button, ButtonProps, Text } from './ui';
|
||||
import { Button, ButtonProps } from './ui/button';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface SecondaryButtonProps extends ButtonProps {}
|
||||
|
||||
|
||||
@@ -5,7 +5,9 @@ import { ColorOption } from '../style/theme';
|
||||
import { PositionAnimationSettings } from './animations/position_animation';
|
||||
import { SlideAnimation, SlideAnimationState } from './animations/slide_animation';
|
||||
|
||||
import { Container, Flex, Text } from './ui';
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface ErrorProps {
|
||||
icon: string;
|
||||
|
||||
@@ -5,7 +5,11 @@ import { zIndex } from '../style/z_index';
|
||||
|
||||
import { PositionAnimationSettings } from './animations/position_animation';
|
||||
import { SlideAnimation, SlideAnimationState } from './animations/slide_animation';
|
||||
import { Container, Flex, Icon, Text } from './ui';
|
||||
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
import { Icon } from './ui/icon';
|
||||
import { Text } from './ui/text';
|
||||
|
||||
export interface PanelProps {
|
||||
title?: string;
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
export { Text, TextProps, Title } from './text';
|
||||
export { Circle, CircleProps } from './circle';
|
||||
export { Button, ButtonProps } from './button';
|
||||
export { Flex, FlexProps } from './flex';
|
||||
export { Container, ContainerProps } from './container';
|
||||
export { Input, InputProps } from './input';
|
||||
export { Icon, IconProps } from './icon';
|
||||
export { Spinner, SpinnerProps } from './spinner';
|
||||
export { Overlay, OverlayProps } from './overlay';
|
||||
@@ -13,7 +13,9 @@ import { zIndex } from '../style/z_index';
|
||||
|
||||
import { SlideAnimationState } from './animations/slide_animation';
|
||||
import { SlidingPanel } from './sliding_panel';
|
||||
import { Container, Flex } from './ui';
|
||||
import { Container } from './ui/container';
|
||||
import { Flex } from './ui/flex';
|
||||
|
||||
export interface ZeroExInstantContainerProps {}
|
||||
export interface ZeroExInstantContainerState {
|
||||
tokenSelectionPanelAnimationState: SlideAnimationState;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { Overlay } from './ui';
|
||||
import { Overlay } from './ui/overlay';
|
||||
import { ZeroExInstantContainer } from './zero_ex_instant_container';
|
||||
import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user