Skip to content

Commit

Permalink
feat(#377): Checkpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
doug-wade committed Jan 10, 2024
1 parent 211d43d commit 654ced1
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ export default meta;

type Story = StoryObj;

export const Default: Story = {
render: () => html`<tybalt-one></tybalt-one>`,
};

export const Primary: Story = {
render: () => html`<tybalt-one prop="primary"></tybalt-one>`,
};

export const Secondary: Story = {
render: () => html`<tybalt-one prop="secondary"></tybalt-one>`,
};
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import type { Meta, StoryObj } from 'storybook-framework-tybalt';

import { html } from '@tybalt/core';

const meta: Meta = {
Expand All @@ -10,6 +9,10 @@ export default meta;

type Story = StoryObj;

export const Default: Story = {
render: () => html`<tybalt-two></tybalt-two>`,
};

export const Primary: Story = {
render: () => html`<tybalt-two prop="primary"></tybalt-two>`,
};
Expand All @@ -19,5 +22,5 @@ export const Secondary: Story = {
};

export const Tertiary: Story = {
render: () => html`<tybalt-two prop="secondary"></tybalt-two>`,
render: () => html`<tybalt-two prop="tertiary"></tybalt-two>`,
};
11 changes: 11 additions & 0 deletions packages/storybook-framework-tybalt-example/components/two.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineComponent, html } from "@tybalt/core";

export default defineComponent({
name: 'tybalt-two',
props: {
prop: { default: 'primary' }
},
render({ prop }) {
return html`<div>two: ${prop}</div>`;
}
});
26 changes: 20 additions & 6 deletions packages/storybook-framework-tybalt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
"version": "0.0.19",
"description": "Framework for using storybook with tybalt",
"main": "dist/index.js",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"files": ["dist/**/*", "types/**/*", "README.md", "*.js", "*.d.ts"],
"scripts": {
"build": "tsc index.ts --outDir dist",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"no tests yet\" && exit 0"
},
"devDependencies": {
"typescript": "^4.1.3"
Expand All @@ -27,9 +30,20 @@
},
"exports": {
".": {
"types": "./index.d.ts",
"require": "./dist/index.js"
}
},
"types": "./index.d.ts"
"types": "./dist/index.d.ts",
"require": "./dist/index.js",
"import": "./dist/index.mjs"
},
"./preset": {
"types": "./dist/preset.d.ts",
"require": "./dist/preset.js",
"import": "./dist/preset.mjs"
},
"./preview.js": {
"types": "./dist/preview.d.ts",
"require": "./dist/preview.js",
"import": "./dist/preview.mjs"
},
"./package.json": "./package.json"
}
}

0 comments on commit 654ced1

Please sign in to comment.