Skip to content

Commit 89daec1

Browse files
committed
docs: Add module import statements to docs page
Signed-off-by: Akshat Patel <akshat@live.ca>
1 parent 8b40523 commit 89daec1

File tree

49 files changed

+323
-56
lines changed

Some content is hidden

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

49 files changed

+323
-56
lines changed

src/accordion/accordion.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ import {
88
import { AccordionItem } from "./accordion-item.component";
99

1010
/**
11+
* Get started with importing the module:
12+
*
13+
* ```typescript
14+
* import { AccordionModule } from 'carbon-components-angular';
15+
* ```
16+
*
1117
* [See demo](../../?path=/story/components-accordion--basic)
1218
*/
1319
@Component({

src/accordion/accordion.stories.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* tslint:disable variable-name */
22

3-
import { moduleMetadata, Meta, Story } from "@storybook/angular";
3+
import { moduleMetadata, Meta } from "@storybook/angular";
44
import { DocumentationModule } from "../documentation-component/documentation.module";
55
import { AccordionModule, Accordion } from "./";
66

@@ -10,10 +10,11 @@ export default {
1010
moduleMetadata({
1111
imports: [AccordionModule, DocumentationModule]
1212
})
13-
]
13+
],
14+
component: Accordion
1415
} as Meta;
1516

16-
const Template: Story<Accordion> = (args) => ({
17+
const Template = (args) => ({
1718
props: args,
1819
template: `
1920
<cds-accordion [align]="align" [size]="size">
@@ -51,7 +52,7 @@ Basic.argTypes = {
5152
selected: { action: "Selected" }
5253
};
5354

54-
const WithTitleTemplate: Story<Accordion> = (args) => ({
55+
const WithTitleTemplate = (args) => ({
5556
props: args,
5657
template: `
5758
<div style="width: 500px">
@@ -85,7 +86,7 @@ WithTitle.parameters = {
8586
}
8687
};
8788

88-
const WithSkeleton: Story<Accordion> = (args) => ({
89+
const WithSkeleton = (args) => ({
8990
props: args,
9091
template: `
9192
<div style="width: 500px">

src/breadcrumb/breadcrumb.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ import { I18n } from "carbon-components-angular/i18n";
1818
const MINIMUM_OVERFLOW_THRESHOLD = 4;
1919

2020
/**
21-
* [See demo](../../?path=/story/components-breadcrumb--basic)
21+
* Get started with importing the module:
22+
*
23+
* ```typescript
24+
* import { BreadcrumbModule } from 'carbon-components-angular';
25+
* ```
26+
*
27+
* [See demo](../../?path=/story/components-breadcrumb--basic)
2228
*/
2329
@Component({
2430
selector: "cds-breadcrumb, ibm-breadcrumb",

src/button/button-set.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
import { Component, HostBinding } from "@angular/core";
22

3+
/**
4+
* Get started with importing the module:
5+
*
6+
* ```typescript
7+
* import { ButtonModule } from 'carbon-components-angular';
8+
* ```
9+
*
10+
* [See demo](../../?path=/story/components-button-button-set--basic)
11+
*/
312
@Component({
413
selector: "cds-button-set, ibm-button-set",
514
template: "<ng-content></ng-content>"

src/button/button.directive.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ import {
66
import { ButtonSize, ButtonType } from "./button.types";
77

88
/**
9-
* A convenience directive for applying styling to a button.
9+
* A convenience directive for applying styling to a button. Get started with importing the module:
1010
*
11-
* [See demo](../../?path=/story/components-button--basic)
11+
* ```typescript
12+
* import { ButtonModule } from 'carbon-components-angular';
13+
* ```
1214
*
1315
* Example:
1416
*
@@ -18,6 +20,8 @@ import { ButtonSize, ButtonType } from "./button.types";
1820
* ```
1921
*
2022
* See the [vanilla carbon docs](http://www.carbondesignsystem.com/components/button/code) for more detail.
23+
*
24+
* [See demo](../../?path=/story/components-button--basic)
2125
*/
2226
@Directive({
2327
selector: "[cdsButton], [ibmButton]"

src/button/icon-button.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ import {
1212
import { BaseIconButton } from "./base-icon-button.component";
1313
import { ButtonSize, ButtonType } from "./button.types";
1414

15+
/**
16+
* Get started with importing the module:
17+
*
18+
* ```typescript
19+
* import { ButtonModule } from 'carbon-components-angular';
20+
* ```
21+
*
22+
* [See demo](../../?path=/story/components-button-icon-button--basic)
23+
*/
1524
@Component({
1625
selector: "cds-icon-button, ibm-icon-button",
1726
template: `

src/checkbox/checkbox.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ export enum CheckboxState {
2424
}
2525

2626
/**
27+
* Get started with importing the module:
28+
*
29+
* ```typescript
30+
* import { CheckboxModule } from 'carbon-components-angular';
31+
* ```
32+
*
2733
* [See demo](../../?path=/story/components-checkbox--basic)
2834
*/
2935
@Component({

src/code-snippet/code-snippet.component.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,17 @@ export enum SnippetType {
1818
}
1919

2020
/**
21-
* [See demo](../../?path=/story/components-code-snippet--basic)
21+
* Get started with importing the module:
22+
*
23+
* ```typescript
24+
* import { CodeSnippetModule } from 'carbon-components-angular';
25+
* ```
2226
*
2327
* ```html
2428
* <cds-code-snippet>Code</cds-code-snippet>
2529
* ```
30+
*
31+
* [See demo](../../?path=/story/components-code-snippet--basic)
2632
*/
2733
@Component({
2834
selector: "cds-code-snippet, ibm-code-snippet",

src/combobox/combobox.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ import { I18n, Overridable } from "carbon-components-angular/i18n";
2626
import { Observable } from "rxjs";
2727

2828
/**
29+
* Get started with importing the module:
30+
*
31+
* ```typescript
32+
* import { ComboBoxModule } from 'carbon-components-angular';
33+
* ```
34+
*
2935
* ComboBoxes are similar to dropdowns, except a combobox provides an input field for users to search items and (optionally) add their own.
3036
* Multi-select comboboxes also provide "pills" of selected items.
3137
*

src/contained-list/contained-list.component.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ import {
77
} from "@angular/core";
88
import { ContainedListKind, ContainedListSize } from "./contained-list.enums";
99

10+
/**
11+
* Get started with importing the module:
12+
*
13+
* ```typescript
14+
* import { ContainedListModule } from 'carbon-components-angular';
15+
* ```
16+
*
17+
* [See demo](../../?path=/story/components-contained-list--basic)
18+
*/
1019
@Component({
1120
selector: "cds-contained-list, ibm-contained-list",
1221
template: `

0 commit comments

Comments
 (0)