Simplest approach of adding an element for viewing

This commit is contained in:
tvs 2017-11-03 11:56:18 +01:00
parent 57f01048a5
commit 9b750f4c9e
2 changed files with 16 additions and 13 deletions

View File

@ -1,6 +1,7 @@
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */
import { document } from 'global';
import { stripIndents } from 'common-tags'; // import { stripIndents } from 'common-tags';
// import Vue from 'vue'; // import Vue from 'vue';
// import ErrorDisplay from './ErrorDisplay.vue'; // import ErrorDisplay from './ErrorDisplay.vue';
@ -48,6 +49,9 @@ function renderRoot(options) {
} }
export function renderMain(data, storyStore) { export function renderMain(data, storyStore) {
document.getElementById('root').innerHTML =
'<playground-button></playground-button><h1>Testing dude</h1>';
// if (storyStore.size() === 0) return; // if (storyStore.size() === 0) return;
// const { selectedKind, selectedStory } = data; // const { selectedKind, selectedStory } = data;
// const story = storyStore.getStory(selectedKind, selectedStory); // const story = storyStore.getStory(selectedKind, selectedStory);
@ -89,13 +93,13 @@ export function renderMain(data, storyStore) {
} }
export default function renderPreview({ reduxStore, storyStore }) { export default function renderPreview({ reduxStore, storyStore }) {
// const state = reduxStore.getState(); const state = reduxStore.getState();
// if (state.error) { if (state.error) {
// return renderException(state.error); return renderException(state.error);
// } }
// try { try {
// return renderMain(state, storyStore); return renderMain(state, storyStore);
// } catch (ex) { } catch (ex) {
// return renderException(ex); return renderException(ex);
// } }
} }

View File

@ -1,5 +1,4 @@
import { storiesOf } from '@storybook/polymer'; import { storiesOf } from '@storybook/polymer';
// import '../PlaygroundButton.html';
storiesOf('Welcome', module).add('Welcome', () => storiesOf('Welcome', module).add('Welcome', () => '<playground-button></playground-button>');
console.log('TODO', 'we do not know what to do here yet!')
);