Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

example.tsx

23 lines574 Bytes

1import type { ParentComponent } from 'solid-js'
2​
3export interface ExampleProps {
4 title: string
5 deferStream?: boolean
6 sleep?: number
7}
8​
9export const Example: ParentComponent<ExampleProps> = (props) => {
10 return (
11 <div class="example">
12 <div class="example__header">
13 <div class="example__title">{props.title}</div>
14 <div>[deferStream={String(props.deferStream || false)}]</div>
15 <div style={{ 'margin-left': '10px' }}>
16 [simulated sleep: {props.sleep || 0}ms]
17 </div>
18 </div>
19​
20 {props.children}
21 </div>
22 )