-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'kapser/test-package2' into yann/use-test-package-in-tem…
…plate-stories
- Loading branch information
Showing
26 changed files
with
507 additions
and
126 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
3 changes: 2 additions & 1 deletion
3
docs/snippets/angular/storybook-preview-global-decorator.ts.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
```ts | ||
// .storybook/preview.ts | ||
|
||
import { componentWrapperDecorator } from '@storybook/angular'; | ||
import type { Preview } from '@storybook/angular'; | ||
import { componentWrapperDecorator } from '@storybook/angular'; | ||
|
||
const preview: Preview = { | ||
decorators: [componentWrapperDecorator((story) => `<div style="margin: 3em">${story}</div>`)], | ||
}; | ||
|
||
export default preview; | ||
``` |
19 changes: 19 additions & 0 deletions
19
docs/snippets/angular/storybook-preview-use-global-type.ts.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
```ts | ||
// .storybook/preview.js | ||
|
||
import type { Preview } from '@storybook/angular'; | ||
import { componentWrapperDecorator } from '@storybook/angular'; | ||
|
||
const preview: Preview = { | ||
decorators: [ | ||
componentWrapperDecorator( | ||
(story) => `<div [class]="myTheme">${story}</div>`, | ||
({ globals }) => { | ||
return { myTheme: globals['theme'] }; | ||
} | ||
), | ||
], | ||
}; | ||
|
||
export default preview; | ||
``` |
63 changes: 63 additions & 0 deletions
63
docs/snippets/common/storybook-auto-docs-standalone-page.mdx.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
```mdx | ||
{/* src/GettingStarted.mdx */} | ||
|
||
# Getting Started | ||
|
||
Welcome! Whether you're a designer or a developer, this guide will help you get started and connect you to the essential resources you need. | ||
|
||
## Table of Contents | ||
|
||
- [Design Resources](#design-resources) | ||
- [Figma](#figma) | ||
- [UI/UX Design Guidelines](#uiux-design-guidelines) | ||
- [Design Assets](#design-assets) | ||
|
||
- [Development Resources](#development-resources) | ||
- [Coding Standards](#coding-standards) | ||
- [Version Control](#version-control) | ||
- [Development Tools](#development-tools) | ||
|
||
--- | ||
|
||
## Design Resources | ||
|
||
### Figma | ||
|
||
[Figma](https://www.figma.com/) is a collaborative design and prototyping tool. It's the heart of the design process, allowing designers to work together seamlessly. | ||
|
||
- **Get Access**: If you're not already part of the Figma project, request access from the project lead or manager. | ||
|
||
### UI/UX Design Guidelines | ||
|
||
Before you dive into designing, familiarize yourself with our UI/UX design guidelines. They provide valuable insights into our design philosophy and standards. | ||
|
||
- [UI/UX Guidelines Document](https://your-design-guidelines-link.com) | ||
|
||
### Design Assets | ||
|
||
All the essential design assets like logos, icons, and brand guidelines can be found in the Figma project. Ensure you have access and familiarize yourself with these assets for consistency. | ||
|
||
--- | ||
|
||
## Development Resources | ||
|
||
### Coding Standards | ||
|
||
Maintaining a consistent code style is essential for collaborative development. Our coding standards document will guide you on best practices. | ||
|
||
- [Coding Standards Document](https://your-coding-standards-link.com) | ||
|
||
### Version Control | ||
|
||
We use Git for version control. Make sure you have Git installed and are familiar with its basics. | ||
|
||
### Development Tools | ||
|
||
Your development environment is critical. Here are some tools and resources to help you set up your workspace: | ||
|
||
- **Code Editor**: We recommend using [Visual Studio Code](https://code.visualstudio.com/) for development. It's highly customizable and supports a wide range of extensions. | ||
|
||
- **Package Manager**: [npm](https://www.npmjs.com/) is the package manager we use for JavaScript projects. Install it to manage project dependencies. | ||
|
||
--- | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/snippets/common/storybook-custom-docs-markdown.mdx.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
```mdx | ||
{/* Changelog.mdx */} | ||
|
||
import { Meta, Markdown } from "@storybook/blocks"; | ||
|
||
import Readme from "../../Changelog.md?raw"; | ||
|
||
<Meta title="Changelog" /> | ||
|
||
# Changelog | ||
|
||
<Markdown>{Readme}</Markdown> | ||
``` |
21 changes: 0 additions & 21 deletions
21
docs/snippets/common/storybook-main-enable-transcludemarkdown.js.mdx
This file was deleted.
Oops, something went wrong.
28 changes: 16 additions & 12 deletions
28
docs/snippets/common/storybook-preview-configure-globaltypes.js.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,23 @@ | ||
```js | ||
// .storybook/preview.js | ||
|
||
export const globalTypes = { | ||
theme: { | ||
description: 'Global theme for components', | ||
defaultValue: 'light', | ||
toolbar: { | ||
// The label to show for this toolbar item | ||
title: 'Theme', | ||
icon: 'circlehollow', | ||
// Array of plain string values or MenuItem shape (see below) | ||
items: ['light', 'dark'], | ||
// Change title based on selected value | ||
dynamicTitle: true, | ||
const preview = { | ||
globalTypes: { | ||
theme: { | ||
description: 'Global theme for components', | ||
defaultValue: 'light', | ||
toolbar: { | ||
// The label to show for this toolbar item | ||
title: 'Theme', | ||
icon: 'circlehollow', | ||
// Array of plain string values or MenuItem shape (see below) | ||
items: ['light', 'dark'], | ||
// Change title based on selected value | ||
dynamicTitle: true, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; | ||
``` |
26 changes: 26 additions & 0 deletions
26
docs/snippets/common/storybook-preview-configure-globaltypes.ts-4-9.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
```ts | ||
// .storybook/preview.ts | ||
|
||
// Replace your-framework with the framework you are using (e.g., react, vue3) | ||
import { Preview } from '@storybook/your-framework'; | ||
|
||
const preview: Preview = { | ||
globalTypes: { | ||
theme: { | ||
description: 'Global theme for components', | ||
defaultValue: 'light', | ||
toolbar: { | ||
// The label to show for this toolbar item | ||
title: 'Theme', | ||
icon: 'circlehollow', | ||
// Array of plain string values or MenuItem shape (see below) | ||
items: ['light', 'dark'], | ||
// Change title based on selected value | ||
dynamicTitle: true, | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; | ||
``` |
30 changes: 17 additions & 13 deletions
30
docs/snippets/common/storybook-preview-locales-globaltype.js.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
```js | ||
// .storybook/preview.js | ||
|
||
export const globalTypes = { | ||
locale: { | ||
description: 'Internationalization locale', | ||
defaultValue: 'en', | ||
toolbar: { | ||
icon: 'globe', | ||
items: [ | ||
{ value: 'en', right: '🇺🇸', title: 'English' }, | ||
{ value: 'fr', right: '🇫🇷', title: 'Français' }, | ||
{ value: 'es', right: '🇪🇸', title: 'Español' }, | ||
{ value: 'zh', right: '🇨🇳', title: '中文' }, | ||
{ value: 'kr', right: '🇰🇷', title: '한국어' }, | ||
], | ||
const preview = { | ||
globalTypes: { | ||
locale: { | ||
description: 'Internationalization locale', | ||
defaultValue: 'en', | ||
toolbar: { | ||
icon: 'globe', | ||
items: [ | ||
{ value: 'en', right: '🇺🇸', title: 'English' }, | ||
{ value: 'fr', right: '🇫🇷', title: 'Français' }, | ||
{ value: 'es', right: '🇪🇸', title: 'Español' }, | ||
{ value: 'zh', right: '🇨🇳', title: '中文' }, | ||
{ value: 'kr', right: '🇰🇷', title: '한국어' }, | ||
], | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; | ||
``` |
27 changes: 27 additions & 0 deletions
27
docs/snippets/common/storybook-preview-locales-globaltype.ts-4-9.mdx
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
```ts | ||
// .storybook/preview.ts | ||
|
||
// Replace your-framework with the framework you are using (e.g., react, vue3) | ||
import { Preview } from '@storybook/your-framework'; | ||
|
||
const preview: Preview = { | ||
globalTypes: { | ||
locale: { | ||
description: 'Internationalization locale', | ||
defaultValue: 'en', | ||
toolbar: { | ||
icon: 'globe', | ||
items: [ | ||
{ value: 'en', right: '🇺🇸', title: 'English' }, | ||
{ value: 'fr', right: '🇫🇷', title: 'Français' }, | ||
{ value: 'es', right: '🇪🇸', title: 'Español' }, | ||
{ value: 'zh', right: '🇨🇳', title: '中文' }, | ||
{ value: 'kr', right: '🇰🇷', title: '한국어' }, | ||
], | ||
}, | ||
}, | ||
}, | ||
}; | ||
|
||
export default preview; | ||
``` |
Oops, something went wrong.