Skip to content

Commit

Permalink
Remove/disable RHL (for now) (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
moarwick committed Jan 27, 2019
1 parent e2e2b40 commit 3dda92a
Show file tree
Hide file tree
Showing 11 changed files with 2,741 additions and 1,685 deletions.
1 change: 0 additions & 1 deletion .babelrc
Expand Up @@ -5,7 +5,6 @@
"react"
],
"plugins": [
"react-hot-loader/babel",
"transform-es2015-modules-commonjs"
]
}
2 changes: 2 additions & 0 deletions .npmignore
Expand Up @@ -3,3 +3,5 @@ public/
test/
webpack.config.js
showcase.gif
lib/__tests__
.idea
14 changes: 6 additions & 8 deletions README.md
@@ -1,8 +1,6 @@
react-mt-svg-lines
==================

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)

### Bring your SVGs to life

![GIF Demo](showcase.gif)
Expand All @@ -26,20 +24,20 @@ npm install react-mt-svg-lines --save
```

### Usage
Require `MtSvgLines` into your component (you can import it under any name)...
Require `SvgLines` into your component (you can import it under any name)...
```js
import MtSvgLines from 'react-mt-svg-lines'; // ES6+
import SvgLines from 'react-mt-svg-lines'; // ES6+
// or...
var MtSvgLines = require('react-mt-svg-lines').default;
var SvgLines = require('react-mt-svg-lines').default;
```

In your JSX, wrap it around any valid SVG...
```js
<MtSvgLines animate={ true } duration={ 500 }>
```jsx
<SvgLines animate={ true } duration={ 500 }>
<svg viewBox="0 0 100 100">
<path stroke="green" strokeWidth="10" fill="none" d="M20.8,51c0,0,20.8,18.2,21.5,18.2c0.6,0,33.3-38.5,33.3-38.5" />
</svg>
</MtSvgLines>
</SvgLines>
```


Expand Down
32 changes: 32 additions & 0 deletions lib/__tests__/SvgLines.test.js
@@ -0,0 +1,32 @@
'use strict';

var _react = require('react');

var React = _interopRequireWildcard(_react);

var _enzyme = require('enzyme');

var _index = require('../index');

var _index2 = _interopRequireDefault(_index);

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

describe('SvgLines', function () {
var wrapper = void 0;

it('renders as expected', function () {
wrapper = (0, _enzyme.shallow)(React.createElement(
_index2.default,
null,
React.createElement('svg', null)
));

expect(wrapper.type()).toBe('span');
expect(wrapper.prop('className')).toContain('mt-init');
expect(wrapper.find('style')).toHaveLength(1);
expect(wrapper.find('svg')).toHaveLength(1);
});
});

0 comments on commit 3dda92a

Please sign in to comment.