vaffel / react-components

Searchable repository of React-components

Home Page:http://react-components.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Click-To-Copy NPM Install Links

brigand opened this issue · comments

You could add a copy button for the npm command using react-zeroclipboard. Not sure exactly what it should say.

var ReactZero = require('react-zeroclipboard');
// ...
var command = "npm install --save " + packageName;
<ReactZero text={command}>
  <button>copy "{command}"</button>
</ReactZero>

The copied command would need to be different depending on if it is a production component, dev component or global component. The fact that all components need to be tagged with react-component suggests that they are for production use, but still....