Skip to content

Commit

Permalink
docs(Modal): add import sections to let consumers know where to consu…
Browse files Browse the repository at this point in the history
…me from (#2709)
  • Loading branch information
YossiSaadi authored Jan 9, 2025
1 parent cda32ae commit b42707b
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 3 deletions.
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

0 comments on commit b42707b

Please sign in to comment.