Skip to content

Commit

Permalink
more types, options etc
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitaru committed Feb 15, 2023
1 parent cc36a8f commit 311631d
Show file tree
Hide file tree
Showing 12 changed files with 7,068 additions and 480 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,9 @@ jobs:
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Deploy Github Page
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
21 changes: 21 additions & 0 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { StorybookConfig } from '@storybook/web-components-vite';

const config: StorybookConfig = {
"stories": [
"../src/*.mdx",
"../src/*.stories.@(js|jsx|ts|tsx)"
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials"
],
"framework": {
"name": "@storybook/web-components-vite",
"options": {}
},
"docs": {
autodocs: true,
defaultName: 'Documentation'
}
};
export default config;
6 changes: 6 additions & 0 deletions .storybook/manager.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { addons } from '@storybook/manager-api';

addons.setConfig({
isFullscreen: false,
showNav: false,
})
3 changes: 3 additions & 0 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<script>
window.global = window;
</script>
28 changes: 28 additions & 0 deletions .storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { createLitRenderer, createArgsExtractor } from 'cem-plugin-better-lit-types/storybook'
import { setCustomElementsManifest } from '@storybook/web-components'
import customElements from '../custom-elements.json'

setCustomElementsManifest(customElements);

export const parameters = {
docs: {
isFullscreen: true,
showNav: false,
extractArgTypes: createArgsExtractor(customElements),
},
backgrounds: {
default: 'light',
},
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}

export const render = createLitRenderer({
wrapSlots: true,
joinArrays: true
})
7 changes: 7 additions & 0 deletions custom-elements-manifest.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { betterLitTypes } from 'cem-plugin-better-lit-types'

export default {
globs: ['src/monaco-component.ts'],
plugins: [betterLitTypes],
litelement: true,
}
Loading

0 comments on commit 311631d

Please sign in to comment.