Skip to content

Commit cc76f84

Browse files
authored
Add import documentation snippet to component doc pages (#7535)
1 parent 80ef59b commit cc76f84

File tree

50 files changed

+300
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+300
-0
lines changed

packages/core/src/components/alert/alert.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
**Alerts** notify users of important information and force them to acknowledge the alert content before continuing.
44

5+
@## Import
6+
7+
```tsx
8+
import { Alert } from "@blueprintjs/core";
9+
```
10+
511
Although similar to [**Dialog**](#core/components/dialog), an alert is more restrictive and should only be used for
612
important information. By default, the user can only exit the alert by clicking one of the confirmation buttons;
713
clicking the overlay or pressing the `esc` key will not close the alert. These interactions can be enabled via props.

packages/core/src/components/context-menu/context-menu.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
They essentially generate an opinionated [**Popover**](#core/components/popover) instance configured
55
with the appropriate interaction handlers.
66

7+
@## Import
8+
9+
```tsx
10+
import { ContextMenu } from "@blueprintjs/core";
11+
```
12+
713
@reactExample ContextMenuExample
814

915
@## Usage

packages/core/src/components/dialog/dialog.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
The **Dialog** component presents content overlaid over other parts of the UI via
44
[**Overlay2**](#core/components/overlay2).
55

6+
@## Import
7+
8+
```tsx
9+
import { Dialog } from "@blueprintjs/core";
10+
```
11+
612
<div class="@ns-callout @ns-intent-primary @ns-icon-info-sign @ns-callout-has-body-content">
713
<h5 class="@ns-heading">Terminology note</h5>
814

packages/core/src/components/drawer/drawer.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
33
**Drawers** overlay content over existing parts of the UI and are anchored to the edge of the screen.
44
It is built using the lower-level [**Overlay2**](#core/components/overlay2) component.
55

6+
@## Import
7+
8+
```tsx
9+
import { Drawer } from "@blueprintjs/core";
10+
```
11+
612
@reactExample DrawerExample
713

814
@## Usage

packages/core/src/components/entity-title/entity-title.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
**EntityTitle** is a component that handles rendering a common UI pattern consisting of title, icon, subtitle and tag.
44

5+
@## Import
6+
7+
```tsx
8+
import { EntityTitle } from "@blueprintjs/core";
9+
```
10+
511
@reactExample EntityTitleExample
612

713
@## Props interface

packages/core/src/components/forms/checkbox.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
A checkbox allows the user to toggle between checked, unchecked, and (sometimes) indeterminate states.
44

5+
@## Import
6+
7+
```tsx
8+
import { Checkbox } from "@blueprintjs/core";
9+
```
10+
511
@reactExample CheckboxExample
612

713
@## Usage

packages/core/src/components/forms/control-group.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ promoted to live in a control group.
1616

1717
</div>
1818

19+
@## Import
20+
21+
```tsx
22+
import { ControlGroup } from "@blueprintjs/core";
23+
```
24+
1925
@reactExample ControlGroupExample
2026

2127
@## Flex layout

packages/core/src/components/forms/file-input.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
**FileInput** is a lightweight wrapper around a `<label>` container element which contains an `<input type="file">`.
44

5+
@## Import
6+
7+
```tsx
8+
import { FileInput } from "@blueprintjs/core";
9+
```
10+
511
@reactExample FileInputExample
612

713
@## Usage

packages/core/src/components/forms/form-group.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Form groups support more complex form controls than [simple labels](#core/compon
44
such as [control groups](#core/components/control-group) or [`NumericInput`](#core/components/numeric-input).
55
They also support additional helper text to aid with user navigation.
66

7+
@## Import
8+
9+
```tsx
10+
import { FormGroup } from "@blueprintjs/core";
11+
```
12+
713
@reactExample FormGroupExample
814

915
@## Props

packages/core/src/components/forms/input-group.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@
44
This component allows you to optionally add icons and buttons _within_ a text input to expand its appearance and
55
functionality. For example, you might use an input group to build a visibility toggle for a password field.
66

7+
@## Import
8+
9+
```tsx
10+
import { InputGroup } from "@blueprintjs/core";
11+
```
12+
713
@reactExample InputGroupExample
814

915
@## Usage

0 commit comments

Comments
 (0)