Skip to content
This repository has been archived by the owner on Jan 6, 2025. It is now read-only.

Add docs on how to register toolkit web components in JS/TS #348

Closed
hawkticehurst opened this issue Mar 3, 2022 · 1 comment · Fixed by #383
Closed

Add docs on how to register toolkit web components in JS/TS #348

hawkticehurst opened this issue Mar 3, 2022 · 1 comment · Fixed by #383
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@hawkticehurst
Copy link
Member

Feature/component description

Based on this issue, we should do a better job of documenting/highlighting how to register toolkit web components from within a JavaScript or TypeScript file.

Like so:

import { 
  provideVSCodeDesignSystem, 
  vsCodeButton, 
  vsCodeCheckbox,
  // Import other component functions –– always in the form `vsCode{ComponentName}`
} from "@vscode/webview-ui-toolkit"

provideVSCodeDesignSystem()
  .register(
    vsCodeButton(), 
    vsCodeCheckbox(),
    // Register other component functions here
  );

Use case

Toolkit users may not always want to use the toolkit via the bundled toolkit.js or toolkit.min.js files, so we should better document how to import and register individual components.

@hawkticehurst hawkticehurst added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 3, 2022
@hawkticehurst
Copy link
Member Author

Reference docs we can use to model our own documentation: https://www.fast.design/docs/components/getting-started

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant