Skip to content

Commit 91e9c00

Browse files
committed
story for selectorPanel
1 parent 03817d7 commit 91e9c00

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

src/stories/Interactive.stories.mdx

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ import * as UI from '../../lib'
22

33
import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
44

5+
import { action } from '@storybook/addon-actions'
6+
57
<Meta title="Interactive"/>
68

79
## Ask name
@@ -60,3 +62,35 @@ A TR to represent a draggable person, etc in a list
6062
</Story>
6163
</Canvas>
6264

65+
## selectorPanel
66+
67+
[API documentation](https://solid.github.io/solid-ui/Documentation/api/modules/_widgets_buttons_.html#selectorpanel)
68+
69+
<Canvas>
70+
<Story name="selectorPanel">
71+
{() => {
72+
const kb = UI.rdf.graph()
73+
const type = UI.rdf.namedNode('http://example.com/#type')
74+
const predicate = UI.rdf.namedNode('http://example.com/#pred')
75+
const inverse = false
76+
const possible = [
77+
UI.rdf.namedNode('http://example.com/#blue'),
78+
UI.rdf.namedNode('http://example.com/#green'),
79+
UI.rdf.namedNode('http://example.com/#yellow')
80+
]
81+
const options = {}
82+
return UI.widgets.selectorPanel(
83+
document,
84+
kb,
85+
type,
86+
predicate,
87+
inverse,
88+
possible,
89+
options,
90+
action("selection"),
91+
action("link clicked")
92+
)
93+
}
94+
}
95+
</Story>
96+
</Canvas>

0 commit comments

Comments
 (0)