Skip to content

Commit 01e8c4d

Browse files
committed
story for setName
1 parent 47caf43 commit 01e8c4d

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

src/stories/Display.stories.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,23 @@ import { Canvas, Meta, Story } from '@storybook/addon-docs/blocks'
1919
}
2020
</Story>
2121
</Canvas>
22+
23+
## setName
24+
25+
Sets the best name we have and looks up a better one
26+
27+
[API documentation](https://solid.github.io/solid-ui/Documentation/api/modules/_widgets_buttons_.html#setname)
28+
29+
<Canvas>
30+
<Story name="setName">
31+
{
32+
() => {
33+
const div = document.createElement("div")
34+
const jane = UI.rdf.namedNode('https://jane.example/person/card#me')
35+
UI.store.add(jane, UI.ns.foaf('name'), 'Jane Doe')
36+
UI.widgets.setName(div, jane)
37+
return div
38+
}
39+
}
40+
</Story>
41+
</Canvas>

0 commit comments

Comments
 (0)