Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(Modal): add import sections to let consumers know where to consume from #2709

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export const editableHeadingTemplate = createComponentTemplate(EditableHeading);
# EditableHeading

- [Overview](#overview)
- [Import](#import)
- [Props](#props)
- [Usage](#usage)
- [Variants](#variants)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import { TipEditableHeading } from "./Heading.stories.helpers";
# Heading

- [Overview](#overview)
- [Import](#import)
- [Props](#props)
- [Usage](#usage)
- [Variants](#variants)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import * as ModalStories from "./LegacyModal.stories";
<DeprecatedWarning alternativeName="Modal" alternativeLink="/?path=/docs/components-modal-new" />

- [Overview](#overview)
- [Import](#import)
- [Props](#props)
- [Usage](#usage)
- [Variants](#variants)
Expand Down
20 changes: 20 additions & 0 deletions packages/core/src/components/Modal/Modal/__stories__/Modal.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,26 @@ import {
We have 3 different modal component, each one provide a different layout for a different use case:
</p>

### Import

All the Modal-related components can be imported from `@vibe/core/next`.

Notice not to import components directly from the `@vibe/core` package, as they are deprecated.

```ts
import {
Modal,
ModalHeader,
ModalContent,
ModalMedia,
ModalFooter,
ModalFooterWizard,
ModalBasicLayout,
ModalSideBySideLayout,
ModalMediaLayout
} from "@vibe/core/next";
```

### Basic modal

The <StorybookLink page="Components/Modal [New]/Basic modal">Basic Modal</StorybookLink> is intended for straightforward tasks, like selecting items or gathering basic information. Basic Modals help users focus on a single task without distractions. These modals do not support images or videos.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,16 @@ The Basic Modal is intended for straightforward tasks, like selecting items or g

<Canvas of={ModalBasicLayoutStories.Overview} />

### Import

All the Basic Modal layout components can be imported from `@vibe/core/next`.

Notice not to import components directly from the `@vibe/core` package, as they are deprecated.

```ts
import { Modal, ModalHeader, ModalContent, ModalFooter, ModalFooterWizard, ModalBasicLayout } from "@vibe/core/next";
```

## Props

<PropsTable />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ The Media Modal includes a highlighted media section, followed by a textual cont

<Canvas of={MediaModalStories.Overview} />

### Import

All the Media Modal layout components can be imported from `@vibe/core/next`.

Notice not to import components directly from the `@vibe/core` package, as they are deprecated.

```ts
import { Modal, ModalHeader, ModalContent, ModalMedia, ModalFooter, ModalFooterWizard, ModalMediaLayout } from "@vibe/core/next";
```

## Props

<PropsTable />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ The Side-by-side Modal offers a layout with two distinct sections. The left side

<Canvas of={SideBySideModalStories.Overview} />

### Import

All the Side-by-side Modal layout components can be imported from `@vibe/core/next`.

Notice not to import components directly from the `@vibe/core` package, as they are deprecated.

```ts
import { Modal, ModalHeader, ModalContent, ModalMedia, ModalFooter, ModalFooterWizard, ModalSideBySideLayout } from "@vibe/core/next";
```

## Props

<PropsTable />
Expand Down
Loading