Skip to content

Commit b64a2ce

Browse files
authored
chore: add example of importing from lib to docs
1 parent 168b8e8 commit b64a2ce

37 files changed

+88
-73
lines changed

src/ActionBar/ActionBar.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,11 @@ const clickBackBtn = () => {
9494
The **Action Bar** is located at the top of the page and is used for page title and main actions for the
9595
page.
9696
</Description>
97-
<Import sourceModule={require('./ActionBar')} />
97+
<Import sourceModulePath={require.resolve('./ActionBar')} />
9898

9999
<Separator />
100100

101-
<Properties sourceModule={require('./ActionBar')} />
101+
<Properties sourceModulePath={require.resolve('./ActionBar')} />
102102

103103
<Separator />
104104

src/Alert/Alert.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ export const AlertComponent = () => {
3838
<Description>
3939
An **Alert** provides a message within the application that is color-coded to emphasize the level of urgency.
4040
</Description>
41-
<Import sourceModule={require('./Alert')} />
41+
<Import sourceModulePath={require.resolve('./Alert')} />
4242

4343
<Separator />
4444

45-
<Properties sourceModule={require('./Alert')} />
45+
<Properties sourceModulePath={require.resolve('./Alert')} />
4646

4747
<Separator />
4848

src/Badge/Badge.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ export const BadgeComponent = () => {
6363
<div>
6464
<Header>Status Indicators</Header>
6565
<Description>Status Indicators are used to easily highlight the state of an object.</Description>
66-
<Import sourceModule={require('./Badge')} />
66+
<Import sourceModulePath={require.resolve('./Badge')} />
6767

6868
<Separator />
6969

70-
<Properties sourceModule={require('./Badge')} />
70+
<Properties sourceModulePath={require.resolve('./Badge')} />
7171

7272
<Separator />
7373

src/Breadcrumb/Breadcrumb.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ export const BreadcrumbComponent = () => {
3030
to previous levels in the path. When clicking on the current page, a dropdown allows users to access
3131
other pages at that same level.
3232
</Description>
33-
<Import sourceModule={require('./Breadcrumb')} />
33+
<Import sourceModulePath={require.resolve('./Breadcrumb')} />
3434

3535
<Separator />
3636

37-
<Properties sourceModule={require('./Breadcrumb')} />
37+
<Properties sourceModulePath={require.resolve('./Breadcrumb')} />
3838

3939
<Separator />
4040

src/Button/Button.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,11 +135,11 @@ content like appearing in a table or list. There may be more than one on the pag
135135
instance, the most important button has a blue background where as a red button should only be used if
136136
the action it performs is potentially destructive.
137137
</Description>
138-
<Import sourceModule={require('./Button')} />
138+
<Import sourceModulePath={require.resolve('./Button')} />
139139

140140
<Separator />
141141

142-
<Properties sourceModule={require('./Button')} />
142+
<Properties sourceModulePath={require.resolve('./Button')} />
143143

144144
<Separator />
145145

src/Calendar/Calendar.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export const CalendarComponent = () => {
1515
The **Calendar** is commonly used as the contents of a **Popover** when composing a **Date Picker**.
1616
It is rarely used on its own as a standalone component.
1717
</Description>
18-
<Import sourceModule={require('./Calendar')} />
18+
<Import sourceModulePath={require.resolve('./Calendar')} />
1919

2020
<Separator />
2121

22-
<Properties sourceModule={require('./Calendar')} />
22+
<Properties sourceModulePath={require.resolve('./Calendar')} />
2323

2424
<Separator />
2525

src/ComboboxInput/ComboboxInput.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ export const ComboboxInputComponent = () => {
4040
<div>
4141
<Header>Combobox Input</Header>
4242

43-
<Import sourceModule={require('./ComboboxInput')} />
43+
<Import sourceModulePath={require.resolve('./ComboboxInput')} />
4444

4545
<Separator />
4646

47-
<Properties sourceModule={require('./ComboboxInput')} />
47+
<Properties sourceModulePath={require.resolve('./ComboboxInput')} />
4848

4949
<Separator />
5050

src/DatePicker/DatePicker.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ export const DatePickerComponent = () => {
1919
The **Date Picker** is an opinionated composition of the **Input Group**, **Popover**
2020
and **Calendar** components to accomplish the UI pattern for picking a date.
2121
</Description>
22-
<Import sourceModule={require('./DatePicker')} />
22+
<Import sourceModulePath={require.resolve('./DatePicker')} />
2323

2424
<Separator />
2525

26-
<Properties sourceModule={require('./DatePicker')} />
26+
<Properties sourceModulePath={require.resolve('./DatePicker')} />
2727

2828
<Separator />
2929

src/Dropdown/Dropdown.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,11 @@ export const DropdownComponent = () => {
161161
The **Dropdown** component lets the user select one of the different options.
162162
It is more flexible than the normal Select.
163163
</Description>
164-
<Import sourceModule={require('./Dropdown')} />
164+
<Import sourceModulePath={require.resolve('./Dropdown')} />
165165

166166
<Separator />
167167

168-
<Properties sourceModule={require('./Dropdown')} />
168+
<Properties sourceModulePath={require.resolve('./Dropdown')} />
169169

170170
<Separator />
171171

src/Forms/Forms.Component.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,11 +272,11 @@ Along with Invalid and Warning, error messages should be displayed below the fie
272272
Form elements include field layout, checkboxes, radio buttons and states of a field. Use these
273273
components along with inline help and error state.
274274
</Description>
275-
<Import sourceModule={require('./Forms')} />
275+
<Import sourceModulePath={require.resolve('./Forms')} />
276276

277277
<Separator />
278278

279-
<Properties sourceModule={require('./Forms')} />
279+
<Properties sourceModulePath={require.resolve('./Forms')} />
280280

281281
<Separator />
282282

0 commit comments

Comments
 (0)