mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-01-12 22:51:09 +08:00
Lint fixes
This commit is contained in:
@@ -6,20 +6,11 @@
|
||||
|
||||
import React from 'react';
|
||||
import PropChildren from './examples/PropChildren';
|
||||
import UIExplorer, {
|
||||
AppText,
|
||||
Code,
|
||||
Description,
|
||||
DocItem,
|
||||
Section,
|
||||
storiesOf
|
||||
} from '../../ui-explorer';
|
||||
import UIExplorer, { Description, DocItem, Section, storiesOf } from '../../ui-explorer';
|
||||
|
||||
const ImageBackgroundScreen = () => (
|
||||
<UIExplorer title="ImageBackground" url="1-components/ImageBackground">
|
||||
<Description>
|
||||
A image component with support for child content.
|
||||
</Description>
|
||||
<Description>A image component with support for child content.</Description>
|
||||
|
||||
<Section title="Props">
|
||||
<DocItem name="...Image props" />
|
||||
|
||||
@@ -22,7 +22,7 @@ import StyleSheet from '../../apis/StyleSheet';
|
||||
import StyleSheetPropType from '../../propTypes/StyleSheetPropType';
|
||||
import View from '../View';
|
||||
import ViewPropTypes from '../View/ViewPropTypes';
|
||||
import { any, bool, func, number, oneOf, oneOfType, shape, string } from 'prop-types';
|
||||
import { bool, func, number, oneOf, oneOfType, shape, string } from 'prop-types';
|
||||
import React, { Component } from 'react';
|
||||
|
||||
const emptyObject = {};
|
||||
@@ -225,7 +225,9 @@ class Image extends Component<*, State> {
|
||||
}
|
||||
|
||||
if (this.props.children) {
|
||||
throw new Error('The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.');
|
||||
throw new Error(
|
||||
'The <Image> component cannot contain children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user