mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-06-03 07:06:04 +00:00
Remove internal imports. Run prettier.
This commit is contained in:
+20
-15
@@ -1,18 +1,19 @@
|
||||
import React, {Component} from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import Path from './Path';
|
||||
import {pathProps} from '../lib/props';
|
||||
import extractPolyPoints from '../lib/extract/extractPolyPoints';
|
||||
import React, { Component } from "react";
|
||||
import PropTypes from "prop-types";
|
||||
import Path from "./Path";
|
||||
import { pathProps } from "../lib/props";
|
||||
import extractPolyPoints from "../lib/extract/extractPolyPoints";
|
||||
|
||||
export default class extends Component{
|
||||
static displayName = 'Polygon';
|
||||
export default class extends Component {
|
||||
static displayName = "Polygon";
|
||||
static propTypes = {
|
||||
...pathProps,
|
||||
points: PropTypes.oneOfType([PropTypes.string, PropTypes.array]).isRequired
|
||||
points: PropTypes.oneOfType([PropTypes.string, PropTypes.array])
|
||||
.isRequired
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
points: ''
|
||||
points: ""
|
||||
};
|
||||
|
||||
setNativeProps = (...args) => {
|
||||
@@ -23,13 +24,17 @@ export default class extends Component{
|
||||
render() {
|
||||
let points = this.props.points;
|
||||
if (Array.isArray(points)) {
|
||||
points = points.join(',');
|
||||
points = points.join(",");
|
||||
}
|
||||
|
||||
return <Path
|
||||
ref={ele => {this.root = ele;}}
|
||||
{...this.props}
|
||||
d={`M${extractPolyPoints(points)}z`}
|
||||
/>;
|
||||
return (
|
||||
<Path
|
||||
ref={ele => {
|
||||
this.root = ele;
|
||||
}}
|
||||
{...this.props}
|
||||
d={`M${extractPolyPoints(points)}z`}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user