storybook setup and styling

This commit is contained in:
JesmoDev
2022-07-28 14:15:51 +02:00
committed by Jacob Overgaard
parent c33f9852d6
commit e68f25575e
5 changed files with 41 additions and 10 deletions

View File

@@ -0,0 +1,4 @@
<script>
document.body.classList.add('uui-font');
document.body.classList.add('uui-text');
</script>

View File

@@ -0,0 +1,22 @@
<style>
body {
padding: 0px !important;
}
</style>
<script>
(function () {
window.addEventListener('load', () => {
var body = document.querySelector('body');
window.addEventListener('keydown', (e) => {
if (e.ctrlKey === true && e.key === 'g') {
if (body.hasAttribute('baseline-grid')) {
body.removeAttribute('baseline-grid');
} else {
body.setAttribute('baseline-grid', '');
}
}
});
});
})();
</script>

View File

@@ -1,9 +1,12 @@
import '@umbraco-ui/uui-css/dist/uui-css.css';
import '@umbraco-ui/uui';
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};

View File

@@ -1,9 +1,11 @@
import { Story, Meta } from '@storybook/web-components';
import { html } from 'lit';
import { html } from 'lit-html';
import './installer.element';
export default {
title: 'Installer/Installer',
component: 'umb-installer',
id: 'installer',
} as Meta;
const Template: Story = () => html`<umb-installer></umb-installer>`;

View File

@@ -1,5 +1,5 @@
import { Story, Meta } from '@storybook/web-components';
import { html } from 'lit';
import { html } from 'lit-html';
import './upgrader.element';
export default {