Created
August 7, 2020 20:12
-
-
Save eirikb/ba0d2ef9a62e9a23b9de33072264ccce to your computer and use it in GitHub Desktop.
FAST + domdom
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import domdom from "@eirikb/domdom"; | |
import { | |
FASTDesignSystemProvider, | |
FASTButton, | |
FASTAccordion | |
} from "@microsoft/fast-components"; | |
const { React, init, on, set, get } = domdom(); | |
FASTDesignSystemProvider; | |
FASTButton; | |
FASTAccordion; | |
init( | |
document.body, | |
<fast-design-system-provider use-defaults> | |
<fast-button onClick={() => set("expanded", !get("expanded"))}> | |
Expand! | |
</fast-button> | |
<fast-design-system-provider use-defaults> | |
<fast-accordion> | |
<fast-accordion-item expanded={on("expanded")}> | |
<span slot="heading">Panel one</span> | |
Panel one content | |
</fast-accordion-item> | |
</fast-accordion> | |
</fast-design-system-provider> | |
</fast-design-system-provider> | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment