mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-10 22:06:22 +10:00
20 lines
439 B
JavaScript
20 lines
439 B
JavaScript
const Component = {
|
|
props: ['name'],
|
|
render (h) {
|
|
return h('p', {
|
|
class: ['component', this.name]
|
|
}, this.name)
|
|
}
|
|
}
|
|
|
|
// When the child component is a pure presentation component,
|
|
// we want to be able to display a sub-component with minimal info,
|
|
// rather than stubbing it directly.
|
|
module.exports = function mockComponent (name) {
|
|
return {
|
|
render (h) {
|
|
return h(Component, { props: { name }})
|
|
}
|
|
}
|
|
}
|