quick-start.stories.mdx 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. import { Meta } from '@storybook/addon-docs/blocks';
  2. <Meta title="Docs/Getting Started/Quick Start" />
  3. # Getting Started
  4. ## Installing
  5. You can install NCore Web (ncore-web) with [NPM](https://www.npmjs.com/package/ncore-web) or Yarn.
  6. - NPM: `npm install ncore-web --save`
  7. - YARN: `yarn add ncore-web`
  8. ## Configuration
  9. You must wrap with NCoreProvider your outermost component. This is important for tools such as theme and localization to be active.
  10. NCoreProvider allows with a prop named "configs" you to make changes to themes and language packs and select initial theme and initial language.
  11. ```jsx
  12. <NCoreProvider
  13. configs={{
  14. themes: [
  15. // ... (theme schemes)
  16. ],
  17. designTokens: {
  18. // ... (design token schemes)
  19. },
  20. localeS: [
  21. // ... (locale schemes)
  22. ],
  23. initialThemeKey: string // initial theme key.
  24. initialLanguage: string // initial language key.
  25. }}
  26. >
  27. <Button title="Button"/>
  28. </NCoreProvider>
  29. ```
  30. If you want to set config, please look at Configs and Schemes Pages.