simple-rollup-button
Advanced tools
Comparing version
@@ -1,12 +0,7 @@ | ||
'use strict'; | ||
import React from 'react'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var React = _interopDefault(require('react')); | ||
function Button(_ref) { | ||
var handlePress = _ref.handlePress, | ||
buttonText = _ref.buttonText; | ||
_ref$buttonText = _ref.buttonText, | ||
buttonText = _ref$buttonText === void 0 ? 'IAmDefaultText' : _ref$buttonText; | ||
return React.createElement("button", { | ||
@@ -17,2 +12,2 @@ onClick: handlePress | ||
exports.Button = Button; | ||
export default Button; |
@@ -1,12 +0,7 @@ | ||
'use strict'; | ||
import React from 'react'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } | ||
var React = _interopDefault(require('react')); | ||
function Button(_ref) { | ||
var handlePress = _ref.handlePress, | ||
buttonText = _ref.buttonText; | ||
_ref$buttonText = _ref.buttonText, | ||
buttonText = _ref$buttonText === void 0 ? 'IAmDefaultText' : _ref$buttonText; | ||
return React.createElement("button", { | ||
@@ -17,2 +12,2 @@ onClick: handlePress | ||
exports.Button = Button; | ||
export default Button; |
{ | ||
"name": "simple-rollup-button", | ||
"version": "2.0.5", | ||
"version": "2.1.4", | ||
"description": "Moving the super simple button into its own package", | ||
@@ -17,8 +17,3 @@ "main": "./lib/prod.js", | ||
"license": "ISC", | ||
"dependencies": { | ||
"@babel/core": "^7.2.2", | ||
"@babel/preset-env": "^7.3.1", | ||
"@babel/preset-react": "^7.0.0" | ||
}, | ||
"gitHead": "083d83c75f6a79f932ef97cee641964020d349eb" | ||
"gitHead": "eef9c833a86aa3717fe6d71cdd27a715aa5c4488" | ||
} |
import React from 'react'; | ||
export default function Button({handlePress, buttonText}) { | ||
return ( | ||
<button onClick={handlePress}>{buttonText}</button> | ||
) | ||
export default function Button({ handlePress, buttonText = 'IAmDefaultText' }) { | ||
return <button onClick={handlePress}>{buttonText}</button>; | ||
} |
import Button from './components/Button.jsx'; | ||
export { Button }; | ||
export default Button; |
Sorry, the diff of this file is not supported yet
0
-100%1910
-43.39%26
-18.75%- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed