Extract EditIcon to a separate file

This commit is contained in:
Kimmo Puputti 2017-08-25 12:44:46 +03:00
parent 05b34a6992
commit e079e8c802
2 changed files with 47 additions and 41 deletions

View file

@ -0,0 +1,44 @@
import React, { PropTypes } from 'react';
const EditIcon = props => {
const { className } = props;
return (
<svg
className={className}
width="16px"
height="16px"
viewBox="0 0 16 16"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
>
<g
stroke="none"
strokeWidth="1"
fill="none"
fillRule="evenodd"
strokeLinecap="round"
strokeLinejoin="round"
>
<g transform="translate(-255.000000, -76.000000)" stroke="#FFFFFF">
<g transform="translate(0.000000, 60.000000)">
<g transform="translate(256.000000, 16.000000)">
<polygon
points="5.1611 12.8804 0.2121 15.0004 2.3331 10.0504 11.1721 1.2124 14.0001 4.0404"
/>
<path d="M12.1641,5.876 L9.3361,3.048" />
<path d="M5.1611,12.8804 L2.3331,10.0504" />
</g>
</g>
</g>
</g>
</svg>
);
};
EditIcon.defaultProps = { className: null };
const { string } = PropTypes;
EditIcon.propTypes = { className: string };
export default EditIcon;

View file

@ -21,6 +21,7 @@ import {
Topbar,
NamedLink,
} from '../../components';
import EditIcon from './EditIcon';
import { BookingDatesForm } from '../../containers';
import { getListingsById } from '../../ducks/marketplaceData.duck';
import { logout, authenticationInProgress } from '../../ducks/Auth.duck';
@ -29,47 +30,6 @@ import { showListing } from './ListingPage.duck';
import css from './ListingPage.css';
const EditIcon = props => {
const { className } = props;
return (
<svg
className={className}
width="16px"
height="16px"
viewBox="0 0 16 16"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
>
<g
stroke="none"
strokeWidth="1"
fill="none"
fillRule="evenodd"
strokeLinecap="round"
strokeLinejoin="round"
>
<g transform="translate(-255.000000, -76.000000)" stroke="#FFFFFF">
<g transform="translate(0.000000, 60.000000)">
<g transform="translate(256.000000, 16.000000)">
<polygon
points="5.1611 12.8804 0.2121 15.0004 2.3331 10.0504 11.1721 1.2124 14.0001 4.0404"
/>
<path d="M12.1641,5.876 L9.3361,3.048" />
<path d="M5.1611,12.8804 L2.3331,10.0504" />
</g>
</g>
</g>
</g>
</svg>
);
};
EditIcon.defaultProps = { className: null };
const { arrayOf, bool, func, instanceOf, number, object, oneOf, shape, string } = PropTypes;
EditIcon.propTypes = { className: string };
// This defines when ModalInMobile shows content as Modal
const MODAL_BREAKPOINT = 1023;
@ -368,6 +328,8 @@ ListingPageComponent.defaultProps = {
tab: 'listing',
};
const { arrayOf, bool, func, instanceOf, number, object, oneOf, shape, string } = PropTypes;
ListingPageComponent.propTypes = {
// from withRouter
history: shape({