vue-demo-collapse

0.0.2 • Public • Published

vue-demo-collapse

Vue component that shows a demo and a "Show Code" button to expand source code

Install

$ npm install vue-demo-collapse

Usage

Create a <demo-collapse> component, pass your demo in and the source code for that demo wrapped in the <src-file> component.

<script>
	<demo-collapse>
		<demo />

		<src-file
			name="Demo.vue"
			language="html"
		>
			<template v-pre>
				<!-- source code -->
			</template>
		</src-file>
	</demo-collapse>
</script>

<template>
import { DemoCollapse, SrcFile } from 'vue-demo-collapse';
import Demo from './Demo.vue';

export default {
	components: {
		DemoCollapse,
		SrcFile,
		Demo,
	}
};
</template>

License

MIT

Package Sidebar

Install

npm i vue-demo-collapse

Weekly Downloads

0

Version

0.0.2

License

MIT

Unpacked Size

11.6 kB

Total Files

5

Last publish

Collaborators

  • hirokiosame