Stencil Props
A component that passes data attributes as props to Stencil components.
Example passing component inside stencil props useful for keeping classes etc.
Example passing component as a string
passes on data to the my-app component
import Component Prop from '@stencil/core';import 'stencil-props'; @ @ str: string; @ num: number; @ obj: Obj = ; @ arr: number = ; @ bool: boolean; { return <stencil> <div>str - thisstr</div> <div>num - thisnum</div> <div>obj - thisobjfoo</div> <div>arr - thisarr2</div> <div>boo - thisbool ? 'true' : 'false'</div> </stencil-props> ; }
which outputs
str - abc num - 1 obj - bar arr - 3 boo - true
Options
show-errors (default: false)
<stencil ='{x}' >
'show-errors' will log errors to the console