Skip to content

Commit bf7728a

Browse files
authored
Merge pull request #665 from rvsia/addLinksToComponents
Add headers to components' descriptions
2 parents 58254eb + 9288e63 commit bf7728a

34 files changed

+77
-77
lines changed

packages/react-renderer-demo/src/components/mdx/mdx-components.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export const Heading = ({ level, children, component }) => {
4646
const router = useRouter();
4747
const classes = useHeadingStyles();
4848
const id = headerToId(children);
49-
const path = `${router.pathname}#${id}`;
49+
const path = `${router.asPath}#${id}`;
5050
return (
5151
<div id={id} className={classes.offset} data-scroll="true">
5252
<Typography id={`heading-${id}`} className={classes.heading} variant={`h${level}`} component={component}>

packages/react-renderer-demo/src/doc-components/examples-texts/ant/ant-field-array.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**Props**
1+
## Props
22

33
|Prop|Type|Description|
44
|:---|:--:|----------:|
@@ -11,11 +11,11 @@
1111
|noItemsMessage|`node`|A message which is shown, when there are no items in the array.|
1212
|buttonLabels|`object`|`{add: 'ADD', remove: 'REMOVE'}` sets labels of buttons.|
1313

14-
**Revert removal**
14+
## Revert removal
1515

1616
Ant field array allow users to revert latest removal actions.
1717

18-
**Naming**
18+
## Naming
1919

2020
Fields can contain names, then the value will be handled as array of objects.
2121

@@ -42,11 +42,11 @@ const fields = [
4242
[ value1, value2, ... ]
4343
```
4444

45-
**Custom component**
45+
## Custom component
4646

4747
To implement a custom component, please take a look [here](/components/field-array).
4848

49-
### Sub components props
49+
## Sub components props
5050

5151
|name|type|default|target component|
5252
|----|----|-------|----------------|

packages/react-renderer-demo/src/doc-components/examples-texts/ant/ant-wizard.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import CommonWizard from '../wizard.md';
22

33
This a custom component. OnSubmit will send only values from visited steps.
44

5-
**Props**
5+
## Props
66

77
|Prop|Type|Default|Description|
88
|-------------|-------------|-------------|-------------|
@@ -16,12 +16,12 @@ This a custom component. OnSubmit will send only values from visited steps.
1616
|NextButtonProps| object | {} | Props passed to the next button |
1717
|SubmitButtonProps| object | {} | Props passed to the submit button |
1818

19-
**stepsInfo**
19+
### stepsInfo
2020

2121
```jsx
2222
stepsInfo: [
23-
{ title: 'Add a source', subTitle: 'Source' },
24-
{ title: 'Configure a source' },
23+
{ title: 'Add a source', subTitle: 'Source' },
24+
{ title: 'Configure a source' },
2525
{ title: 'Summary' }
2626
]
2727
```
@@ -30,7 +30,7 @@ Supplying `stepsInfo` will create a steps component on top of the form displayin
3030

3131
The object items will be passed as props to a step component. See [here](https://ant.design/components/steps/#Steps.Step).
3232

33-
**Default buttonLabels**
33+
### Default buttonLabels
3434

3535
```jsx
3636
{

packages/react-renderer-demo/src/doc-components/examples-texts/blueprint/blueprint-date-picker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Please check the [original component](https://blueprintjs.com/docs/#datetime/datepicker), it accepts the same props.
22

3-
**Props**
3+
## Props
44

55
DatePicker is wrapped in a form group, so it accepts all [form group props](/mappers/component-api#formgroupwrappedcomponents).
66

packages/react-renderer-demo/src/doc-components/examples-texts/blueprint/blueprint-dual-list-select.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This a custom component with a custom design.
22

3-
**Props**
3+
## Props
44

55
Dual list select is wrapped in a form group, so it accepts all [form group props](/mappers/component-api#formgroupwrappedcomponents).
66

@@ -22,15 +22,15 @@ Dual list select is wrapped in a form group, so it accepts all [form group props
2222
|filterValueText|String|'Remove your filter to see all selected'|Placeholder for value when there is no filtered value|
2323
|filterOptionsText|String|'Remove your filter to see all options'|Placeholder for options when there is no filtered option|
2424

25-
**Options**
25+
### Options
2626

2727
|Props|Type|Description|
2828
|-----|----|-----------|
2929
|value|string|Value of the option|
3030
|label|node|ListItemText primary text|
3131
|MenuItemProps|object|Props passed to MenuItem|
3232

33-
**Customization**
33+
### Customization
3434

3535
|Props|
3636
|-----|

packages/react-renderer-demo/src/doc-components/examples-texts/blueprint/blueprint-field-array.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Blueprint component mapper provides an experimental implementation of field array.
22

3-
**Props**
3+
## Props
44

55
|Prop|Type|Description|
66
|:---|:--:|----------:|
@@ -19,7 +19,7 @@ Blueprint component mapper provides an experimental implementation of field arra
1919
|FormGroupProps|`object`|Props passed to the form group component.|
2020
|FieldArrayProps|`object`|Props passed to the root div.|
2121

22-
**Naming**
22+
## Naming
2323

2424
Fields can contain names, then the value will be handled as array of objects.
2525

@@ -46,6 +46,6 @@ const fields = [
4646
[ value1, value2, ... ]
4747
```
4848

49-
**Custom component**
49+
## Custom component
5050

5151
To implement a custom component, please take a look [here](/components/field-array).

packages/react-renderer-demo/src/doc-components/examples-texts/blueprint/blueprint-wizard.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import CommonWizard from '../wizard.md';
22

33
This a custom component. OnSubmit will send only values from visited steps.
44

5-
**Props**
5+
## Props
66

77
|Prop|Type|Default|Description|
88
|-------------|-------------|-------------|-------------|
@@ -15,7 +15,7 @@ This a custom component. OnSubmit will send only values from visited steps.
1515
|NextButtonProps| object | {} | Props passed to the next button |
1616
|SubmitButtonProps| object | {} | Props passed to the submit button |
1717

18-
**Default buttonLabels**
18+
### Default buttonLabels
1919

2020
```jsx
2121
{

packages/react-renderer-demo/src/doc-components/examples-texts/mui/mui-dual-list-select.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
This a custom component with a custom design.
22

3-
**Props**
3+
## Props
44

55
Dual list select is wrapped in a form group, so it accepts all [form group props](/mappers/component-api#formgroupwrappedcomponents).
66

@@ -23,7 +23,7 @@ Dual list select is wrapped in a form group, so it accepts all [form group props
2323
|filterOptionsText|String|'Remove your filter to see all options'|Placeholder for options when there is no filtered option|
2424
|checkboxVariant|bool|false|Change list item to checkboxes|
2525

26-
**Options**
26+
### Options
2727

2828
|Props|Type|Description|
2929
|-----|----|-----------|
@@ -37,7 +37,7 @@ Dual list select is wrapped in a form group, so it accepts all [form group props
3737
|ListItemTextProps|object|Props passed to ListItemText|
3838
|ListItemSecondaryActionProps|object|Props passed to ListItemSecondaryAction|
3939

40-
**Customization**
40+
### Customization
4141

4242
MUI DualListSelect provides fully customization. When the props offers Right/Left variant, you can pass props to `RightXXX` or to `LeftXXX` props. Example: `ListGridProps` is Right/Left, so there are two more props: `RightListGridProps` and `LeftListGridProps`. These props overrides the standard props, except `className`, that are being combined. All these props are objects.
4343

packages/react-renderer-demo/src/doc-components/examples-texts/mui/mui-field-array.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ MUI component mapper provides an experimental implementation of field array.
1717

1818
MUI field array allow users to revert latest removal actions.
1919

20-
**Naming**
20+
## Naming
2121

2222
Fields can contain names, then the value will be handled as array of objects.
2323

@@ -44,6 +44,6 @@ const fields = [
4444
[ value1, value2, ... ]
4545
```
4646

47-
**Custom component**
47+
## Custom component
4848

4949
To implement a custom component, please take a look [here](/components/field-array).

packages/react-renderer-demo/src/doc-components/examples-texts/mui/mui-slider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Please check the [original component](https://material-ui.com/components/slider/#slider), it accepts the same props.
22

3-
**Props**
3+
## Props
44

55
Slider is wrapped in a form group, so it accepts all [form group props](/mappers/component-api#formgroupwrappedcomponents).
66

0 commit comments

Comments
 (0)