Skip to content

Commit

Permalink
init: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
warmhug committed Jun 5, 2018
1 parent ea981bc commit 22603c2
Show file tree
Hide file tree
Showing 44 changed files with 45 additions and 55 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ English | [简体中文](./README.zh-CN.md)
[![npm package](https://img.shields.io/npm/v/antd-mobile-rn.svg?style=flat-square)](https://www.npmjs.org/package/antd-mobile-rn)
[![NPM downloads](http://img.shields.io/npm/dm/antd-mobile-rn.svg?style=flat-square)](https://npmjs.org/package/antd-mobile-rn)
[![Dependency Status](https://david-dm.org/ant-design/ant-design-mobile-rn.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design-mobile-rn)
[![CDNJS](https://img.shields.io/cdnjs/v/antd-mobile-rn.svg?style=flat-square)](https://cdnjs.com/libraries/antd-mobile-rn)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/ant-design/ant-design-mobile-rn.svg)](http://isitmaintained.com/project/ant-design/ant-design-mobile-rn "Percentage of issues still open")
[![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down
1 change: 0 additions & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
[![npm package](https://img.shields.io/npm/v/antd-mobile-rn.svg?style=flat-square)](https://www.npmjs.org/package/antd-mobile-rn)
[![NPM downloads](http://img.shields.io/npm/dm/antd-mobile-rn.svg?style=flat-square)](https://npmjs.org/package/antd-mobile-rn)
[![Dependency Status](https://david-dm.org/ant-design/ant-design-mobile-rn.svg?style=flat-square)](https://david-dm.org/ant-design/ant-design-mobile-rn)
[![CDNJS](https://img.shields.io/cdnjs/v/antd-mobile-rn.svg?style=flat-square)](https://cdnjs.com/libraries/antd-mobile-rn)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/ant-design/ant-design-mobile-rn.svg)](http://isitmaintained.com/project/ant-design/ant-design-mobile-rn "Percentage of issues still open")
[![Join the chat at https://gitter.im/ant-design/ant-design](https://img.shields.io/gitter/room/ant-design/ant-design.svg?style=flat-square)](https://gitter.im/ant-design/ant-design?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down
2 changes: 1 addition & 1 deletion components/accordion/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { Accordion, List } from 'antd-mobile-rn';
import React from 'react';
import { View } from 'react-native';
import { Accordion, List } from 'antd-mobile-rn';

export default class AccordionExmple extends React.Component<any, any> {
onChange = (key: string) => {
Expand Down
9 changes: 3 additions & 6 deletions components/activity-indicator/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import {
ActivityIndicator,
Button,
Flex,
WhiteSpace,
WingBlank,
} from 'antd-mobile-rn';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default class ActivityIndicatorExample extends React.Component<
any,
any
> {
export default class ActivityIndicatorExample extends React.Component<any, any> {
closeTimer: any;
constructor(props: any) {
super(props);
Expand Down
2 changes: 1 addition & 1 deletion components/badge/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable:jsx-no-multiline-js
/* tslint:disable:no-console */
import { Badge, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView, View } from 'react-native';
import { Badge, WhiteSpace } from 'antd-mobile-rn';

export default class BasicTagExample extends React.Component<any, any> {
render() {
Expand Down
2 changes: 1 addition & 1 deletion components/button/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-unused-variable */
// tslint:disable:jsx-no-multiline-js
import { Button, WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { Button, WhiteSpace, WingBlank } from 'antd-mobile-rn';

/* tslint:disable:no-console */
export default () => (
Expand Down
2 changes: 1 addition & 1 deletion components/card/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Card, WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { Card, WhiteSpace, WingBlank } from 'antd-mobile-rn';

export default class BasicCardExample extends React.Component<any, any> {
render() {
Expand Down
2 changes: 1 addition & 1 deletion components/carousel/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Carousel } from 'antd-mobile-rn';
import React from 'react';
import { StyleSheet, Text, TextStyle, View, ViewStyle } from 'react-native';
import { Carousel } from 'antd-mobile-rn';

export default class BasicCarouselExample extends React.Component<any, any> {
onselectedIndexChange(index: number) {
Expand Down
2 changes: 1 addition & 1 deletion components/checkbox/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tslint:disable:jsx-no-multiline-js
import { Checkbox, List, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { Checkbox, List, WhiteSpace } from 'antd-mobile-rn';
const AgreeItem = Checkbox.AgreeItem;
const CheckboxItem = Checkbox.CheckboxItem;

Expand Down
2 changes: 1 addition & 1 deletion components/date-picker-view/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { DatePickerView } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { DatePickerView } from 'antd-mobile-rn';

export default class DatePickerViewExample extends React.Component {
state = {
Expand Down
2 changes: 1 addition & 1 deletion components/date-picker/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable:jsx-no-multiline-js
/* tslint:disable:no-console */
import { DatePicker, List } from 'antd-mobile-rn';
import React from 'react';
import { View } from 'react-native';
import { DatePicker, List } from 'antd-mobile-rn';

// const now = new Date();

Expand Down
2 changes: 1 addition & 1 deletion components/drawer/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tslint:disable:jsx-no-multiline-js
import { Button, Drawer, List, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView, StyleSheet, Text, View } from 'react-native';
import { Button, Drawer, List, WhiteSpace } from 'antd-mobile-rn';

const styles = StyleSheet.create({
container: {
Expand Down
2 changes: 1 addition & 1 deletion components/flex/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tslint:disable:jsx-no-multiline-js
import { Button, Flex, WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView, Text, TouchableWithoutFeedback, View } from 'react-native';
import { Button, Flex, WhiteSpace, WingBlank } from 'antd-mobile-rn';

const Circle = (props: any) => {
const size = props.size || 20;
Expand Down
2 changes: 1 addition & 1 deletion components/grid/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Grid } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView, Text, View } from 'react-native';
import { Grid } from 'antd-mobile-rn';

const data = Array.from(new Array(9)).map((_val, i) => ({
icon: 'https://os.alipayobjects.com/rmsportal/IptWdCkrtkAUfjE.png',
Expand Down
2 changes: 1 addition & 1 deletion components/icon/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Grid, Icon } from 'antd-mobile-rn';
import React from 'react';
import { Grid, Icon } from 'antd-mobile-rn';

const list = [
'check-circle',
Expand Down
2 changes: 1 addition & 1 deletion components/image-picker/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ImagePicker, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { View } from 'react-native';
import { ImagePicker, WhiteSpace } from 'antd-mobile-rn';

export default class ImagePickerExample extends React.Component<any, any> {
constructor(props: any) {
Expand Down
2 changes: 2 additions & 0 deletions components/index.native.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export { default as Accordion } from './accordion/index.native';
export { default as ActionSheet } from './action-sheet/index.native';
export { default as ActivityIndicator } from './activity-indicator/index.native';
export { default as Badge } from './badge/index.native';
Expand All @@ -10,6 +11,7 @@ export { default as DatePickerView } from './date-picker-view/index.native';
export { default as Drawer } from './drawer/index.native';
export { default as Flex } from './flex/index.native';
export { default as Grid } from './grid/index.native';
export { default as Icon } from './icon/index.native';
export { default as ImagePicker } from './image-picker/index.native';
export { default as InputItem } from './input-item/index.native';
export { default as List } from './list/index.native';
Expand Down
2 changes: 1 addition & 1 deletion components/input-item/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:jsx-no-multiline-js */
import { Button, InputItem, List } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView, Text } from 'react-native';
import { Button, InputItem, List } from 'antd-mobile-rn';

declare var jest: any;

Expand Down
2 changes: 1 addition & 1 deletion components/list/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* tslint:disable:jsx-no-multiline-js */
// tslint:disable:no-empty
import { List } from 'antd-mobile-rn';
import React from 'react';
import { Image, ScrollView, View } from 'react-native';
import { List } from 'antd-mobile-rn';

const Item = List.Item;
const Brief = Item.Brief;
Expand Down
2 changes: 1 addition & 1 deletion components/modal/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { Button, Modal, WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { Text, View, ScrollView } from 'react-native';
import { Button, Modal, WhiteSpace, WingBlank } from 'antd-mobile-rn';

export default class BasicModalExample extends React.Component<any, any> {
constructor(props: any) {
Expand Down
2 changes: 1 addition & 1 deletion components/notice-bar/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable:jsx-no-multiline-js
/* tslint:disable:no-console */
import { NoticeBar, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { Image, Text, View } from 'react-native';
import { NoticeBar, WhiteSpace } from 'antd-mobile-rn';

export default class NoticeBarExample extends React.Component<any, any> {
render() {
Expand Down
2 changes: 1 addition & 1 deletion components/pagination/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Pagination, WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { Pagination, WhiteSpace, WingBlank } from 'antd-mobile-rn';

const locale = {
prevText: '上一步',
Expand Down
2 changes: 1 addition & 1 deletion components/picker-view/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PickerView } from 'antd-mobile-rn';
import React from 'react';
import { PickerView } from 'antd-mobile-rn';

const seasons = [
[
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`renders ./components/picker/demo/popup.native.tsx correctly 1`] = `
exports[`renders ./components/picker/demo/basic.native.tsx correctly 1`] = `
<View
style={
Object {
Expand Down
2 changes: 1 addition & 1 deletion components/picker/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { List, Picker } from 'antd-mobile-rn';
import React from 'react';
import { View, Text, TouchableOpacity } from 'react-native';
import { List, Picker } from 'antd-mobile-rn';

import { district } from 'antd-mobile-demo-data';

Expand Down
2 changes: 1 addition & 1 deletion components/popover/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Popover } from 'antd-mobile-rn';
import React from 'react';
import { Platform, StyleSheet, Text, View, ViewStyle } from 'react-native';
import { Popover } from 'antd-mobile-rn';

const Item = Popover.Item;

Expand Down
2 changes: 1 addition & 1 deletion components/progress/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Button, Progress, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { Text, View, ViewStyle } from 'react-native';
import { Button, Progress, WhiteSpace } from 'antd-mobile-rn';

export default class BasicProgressExample extends React.Component<any, any> {
constructor(props: any) {
Expand Down
2 changes: 1 addition & 1 deletion components/radio/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:jsx-no-multiline-js */
import { List, Radio, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { List, Radio, WhiteSpace } from 'antd-mobile-rn';
const RadioItem = Radio.RadioItem;

export default class BasicRadioExample extends React.Component<any, any> {
Expand Down
2 changes: 1 addition & 1 deletion components/result/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tslint:disable:jsx-no-multiline-js
import { Result } from 'antd-mobile-rn';
import React from 'react';
import { Image, ScrollView, Text } from 'react-native';
import { Result } from 'antd-mobile-rn';

export default class ResultExample extends React.Component<any, any> {
render() {
Expand Down
2 changes: 1 addition & 1 deletion components/search-bar/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SearchBar } from 'antd-mobile-rn';
import React from 'react';
import { Alert, View } from 'react-native';
import { SearchBar } from 'antd-mobile-rn';

export default class SearchBarDemo extends React.Component<any, any> {
state = {
Expand Down
2 changes: 1 addition & 1 deletion components/segmented-control/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { SegmentedControl, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { SegmentedControl, WhiteSpace } from 'antd-mobile-rn';

export default class BasicTagExample extends React.Component<any, any> {
onChange = (e: any) => {
Expand Down
2 changes: 1 addition & 1 deletion components/slider/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Slider } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { Slider } from 'antd-mobile-rn';

export default class BasicSliderExample extends React.Component<any, any> {
constructor(props: any) {
Expand Down
2 changes: 1 addition & 1 deletion components/stepper/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable:jsx-no-multiline-js
/* tslint:disable:no-console */
import { List, Stepper } from 'antd-mobile-rn';
import React from 'react';
import { View } from 'react-native';
import { List, Stepper } from 'antd-mobile-rn';

function onChange(value: any) {
console.log('changed', value);
Expand Down
5 changes: 2 additions & 3 deletions components/steps/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/* tslint:disable:jsx-no-multiline-js */
import { Icon, WingBlank } from 'antd-mobile-rn';
import Steps from '../index.native';
const Step = Steps.Step;
import React from 'react';
import { ScrollView, Text, View } from 'react-native';
import { Icon, WingBlank, Steps } from 'antd-mobile-rn';
const Step = Steps.Step;

export default class BasicTimelineExample extends React.Component<any, any> {
constructor(props: any) {
Expand Down
6 changes: 0 additions & 6 deletions components/style/themes/default.native.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
const brandPrimary = '#108ee9';
const brandPrimaryTap = '#1284d6';

if (typeof console !== 'undefined' && console.warn) {
// tslint:disable-next-line:no-console
console.warn('Note: In antd-mobile-rn@2.2.0, React Native components will be' +
' transferred to the separate `antd-mobile-rn-rn` package.');
}

export default {
// 支付宝钱包默认主题
// https://github.com/ant-design/ant-design-mobile/wiki/设计变量表及命名规范
Expand Down
2 changes: 1 addition & 1 deletion components/swipe-action/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { List, SwipeAction } from 'antd-mobile-rn';
import React from 'react';
import { View } from 'react-native';
import { List, SwipeAction } from 'antd-mobile-rn';

export default class BasicSwipeActionExample extends React.Component<any, any> {
render() {
Expand Down
2 changes: 1 addition & 1 deletion components/switch/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// tslint:disable:jsx-no-multiline-js
import { List, Switch } from 'antd-mobile-rn';
import React from 'react';
import { List, Switch } from 'antd-mobile-rn';

export default class SwitchExample extends React.Component<any, any> {
constructor(props: any) {
Expand Down
2 changes: 1 addition & 1 deletion components/tabs/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { Tabs } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView, Text, View } from 'react-native';
import { Tabs } from 'antd-mobile-rn';

const renderContent = (tab: any, index: any) => {
const style = {
Expand Down
2 changes: 1 addition & 1 deletion components/tag/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable:jsx-no-multiline-js
/* tslint:disable:no-console */
import { Tag, WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { View } from 'react-native';
import { Tag, WhiteSpace } from 'antd-mobile-rn';

function onChange(selected: any) {
console.log(`tag selected: ${selected}`);
Expand Down
2 changes: 1 addition & 1 deletion components/textarea-item/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { List, TextareaItem } from 'antd-mobile-rn';
import React from 'react';
import { ScrollView } from 'react-native';
import { List, TextareaItem } from 'antd-mobile-rn';

export default class BasicTextAreaItemExample extends React.Component<
any,
Expand Down
2 changes: 1 addition & 1 deletion components/toast/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* tslint:disable:no-console */
import { Button, Toast, WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { DeviceEventEmitter } from 'react-native';
import { Button, Toast, WhiteSpace, WingBlank } from 'antd-mobile-rn';

function showToast() {
Toast.info('This is a toast tips !!!');
Expand Down
2 changes: 1 addition & 1 deletion components/white-space/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// tslint:disable:jsx-no-multiline-js
import { WhiteSpace } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { WhiteSpace } from 'antd-mobile-rn';

const PlaceHolder = (props: any) => (
<View
Expand Down
2 changes: 1 addition & 1 deletion components/wing-blank/demo/basic.native.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// tslint:disable:jsx-no-multiline-js

import { WhiteSpace, WingBlank } from 'antd-mobile-rn';
import React from 'react';
import { Text, View } from 'react-native';
import { WhiteSpace, WingBlank } from 'antd-mobile-rn';

const PlaceHolder = (props: any) => (
<View
Expand Down
Loading

0 comments on commit 22603c2

Please sign in to comment.