mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-22 05:02:18 +08:00
11 lines
304 B
JavaScript
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);
|
|
}
|