Skip to content

Commit 6017353

Browse files
committed
Updates demo for switch
1 parent 920092a commit 6017353

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

packages/react-renderer-demo/src/common/examples-definitions.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ export const baseExamples = [{
182182
title: 'Label',
183183
component: 'input',
184184
value: 'Switch',
185+
}, {
186+
name: 'onText',
187+
title: 'onText',
188+
component: 'input',
189+
}, {
190+
name: 'offText',
191+
title: 'offText',
192+
component: 'input',
185193
},
186194
],
187195
},

packages/react-renderer-demo/src/docs-components/component-api.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,15 @@ All those components provides a shared group of props:
8585

8686
<ExampleLink to='radio' />
8787

88+
#### Switch
89+
90+
|Prop|Type|Description|
91+
|----|:--:|----------:|
92+
|onText|string|A text which is shown when the switch is on (checked)|
93+
|offText|string|A text which is shown when the switch is off|
94+
95+
<ExampleLink to='switch-field' />
96+
8897
#### Datepicker
8998

9099
This component is using [react-day-picker](https://react-day-picker.js.org/docs/) as a base component.

0 commit comments

Comments
 (0)