diff --git a/README.md b/README.md
index b3a0a57..df6fd4d 100755
--- a/README.md
+++ b/README.md
@@ -46,14 +46,14 @@ your custom loaders
```jsx
// import the component
-import ContentLoader, { Rect, Circle } from 'react-content-loader'
+import ContentLoader from 'react-content-loader'
const MyLoader = () => {
return (
-
-
-
+
+
+
)
}
diff --git a/src/custom/Circle.js b/src/custom/Circle.js
deleted file mode 100644
index 5dcf1ca..0000000
--- a/src/custom/Circle.js
+++ /dev/null
@@ -1,15 +0,0 @@
-//@flow
-import * as React from 'react'
-
-type Props = {
- x: number,
- y: number,
- radius: number,
-}
-
-const Circle = (props: Props): React.Element<*> => {
- const { x = 0, y = 0, radius = 50 } = props
- return
-}
-
-export default Circle
diff --git a/src/custom/Rect.js b/src/custom/Rect.js
deleted file mode 100644
index eb53c75..0000000
--- a/src/custom/Rect.js
+++ /dev/null
@@ -1,17 +0,0 @@
-//@flow
-import * as React from 'react'
-
-type Props = {
- x: number,
- y: number,
- radius: number,
- width: number,
- height: number,
-}
-
-const Rect = (props: Props): React.Element<*> => {
- const { x = 0, y = 0, radius = 0, width = 50, height = 50 } = props
- return
-}
-
-export default Rect
diff --git a/src/index.js b/src/index.js
index 1a346f2..a08c970 100755
--- a/src/index.js
+++ b/src/index.js
@@ -8,9 +8,6 @@ import InstagramStyle from './stylized/InstagramStyle'
import CodeStyle from './stylized/CodeStyle'
import ListStyle from './stylized/ListStyle'
import BulletListStyle from './stylized/BulletListStyle'
-// Custom
-import Rect from './custom/Rect'
-import Circle from './custom/Circle'
export type Props = {
style: { [key: string]: any },
@@ -60,4 +57,3 @@ ContentLoader.defaultProps = {
};
export default ContentLoader
-export { Rect, Circle }
diff --git a/stories/index.js b/stories/index.js
index edec805..76f6fb8 100644
--- a/stories/index.js
+++ b/stories/index.js
@@ -3,7 +3,6 @@ import React from 'react'
import { storiesOf } from '@storybook/react'
import ContentLoader from '../src/index'
-import { Rect, Circle } from '../src/index'
let defaultStyle = {
width: 400,
@@ -16,9 +15,9 @@ const Container = props =>
{props.children}
const MyLoader = () => {
return (
-
-
-
+
+
+
)
}
diff --git a/tests/custom/Circle.js b/tests/custom/Circle.js
deleted file mode 100644
index b0d5712..0000000
--- a/tests/custom/Circle.js
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from 'react'
-
-import Enzyme, { mount, render } from 'enzyme'
-import Adapter from 'enzyme-adapter-react-16'
-
-import chai, { expect } from 'chai'
-import chaiEnzyme from 'chai-enzyme'
-import sinon from 'sinon'
-
-Enzyme.configure({ adapter: new Adapter() })
-chai.use(chaiEnzyme())
-
-import Circle from '../../src/custom/Circle'
-
-describe('', () => {
- let wrapper
-
- beforeEach(() => {
- wrapper = mount()
- })
-
- it('has defaults props', () => {
- const props = wrapper.props()
-
- for (let key in props) expect(props[key]).to.not.equal(undefined)
- })
-})
diff --git a/tests/custom/Rect.js b/tests/custom/Rect.js
deleted file mode 100644
index 525b8c9..0000000
--- a/tests/custom/Rect.js
+++ /dev/null
@@ -1,26 +0,0 @@
-import React from 'react'
-
-import Enzyme, { mount, render } from 'enzyme'
-import Adapter from 'enzyme-adapter-react-16'
-
-import chai, { expect } from 'chai'
-import chaiEnzyme from 'chai-enzyme'
-import sinon from 'sinon'
-
-Enzyme.configure({ adapter: new Adapter() })
-chai.use(chaiEnzyme())
-import Rect from '../../src/custom/Rect'
-
-describe('', () => {
- let wrapper
-
- beforeEach(() => {
- wrapper = mount()
- })
-
- it('has defaults props', () => {
- const props = wrapper.props()
-
- for (let key in props) expect(props[key]).to.not.equal(undefined)
- })
-})
diff --git a/tests/index.js b/tests/index.js
index 1e075da..916844f 100755
--- a/tests/index.js
+++ b/tests/index.js
@@ -15,9 +15,6 @@ import FacebookStyle from '../src/stylized/FacebookStyle'
import InstagramStyle from '../src/stylized/InstagramStyle'
import CodeStyle from '../src/stylized/CodeStyle'
-import Rect from '../src/custom/Rect'
-import Circle from '../src/custom/Circle'
-
describe(':', () => {
describe('Type props are used', () => {
describe('when type is facebook', () => {
@@ -52,18 +49,21 @@ describe(':', () => {
})
})
- describe('when type is custom', () => {
- const wrapper = mount(
-
-
-
-
- )
+ })
- it('should render custom element', () => {
- expect(wrapper).to.have.descendants(Rect)
- expect(wrapper).to.have.descendants(Circle)
- })
+ describe('when type is custom', () => {
+
+ const wrapper = mount(
+
+
+
+
+
+ )
+
+ it('should render custom element', () => {
+ expect(wrapper.find('rect')).to.have.length(3)
+ expect(wrapper.find('circle')).to.have.length(1)
})
})