@storybook/addon-info
Version:
A Storybook addon to show additional information for your stories.
18 lines (16 loc) • 398 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = copy;
/* eslint-disable no-undef */
function copy(str) {
var tmp = document.createElement('TEXTAREA');
var focus = document.activeElement;
tmp.value = str;
document.body.appendChild(tmp);
tmp.select();
document.execCommand('copy');
document.body.removeChild(tmp);
focus.focus();
}
;