1
0
mirror of https://github.com/storybookjs/storybook.git synced 2025-04-07 16:42:19 +08:00
2018-01-24 00:41:29 +03:00

11 lines
304 B
JavaScript

import { document } from 'global';
export default function addHeadWarning(text, className) {
const warning = document.createElement('h1');
warning.textContent = text;
warning.className = className;
warning.style.color = 'red';
document.body.insertBefore(warning, document.body.firstChild);
}