Skip to content

Commit a359c53

Browse files
committed
Updated docs
1 parent d4ff12f commit a359c53

File tree

4 files changed

+22
-15
lines changed

4 files changed

+22
-15
lines changed

docs/windows/checkbox.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,15 @@ import { Checkbox } from 'react-desktop/windows';
2020

2121
export default class extends Component {
2222
static defaultProps = {
23-
color: '#cc7f29'
23+
color: '#cc7f29',
24+
theme: 'light'
2425
};
2526

2627
render() {
2728
return (
2829
<Checkbox
2930
color={this.props.color}
31+
theme={this.props.theme}
3032
label="Check me!"
3133
onChange={(e) => console.log(e.target.value)}
3234
defaultValue="I got checked!"

docs/windows/master-details-view.md

+13-7
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,13 @@ theme | string | Sets the UI theme that is used by this comp
4444

4545
```jsx
4646
import React, { Component } from 'react';
47-
import { MasterDetailsView, Text } from 'react-desktop/windows';
47+
import {
48+
MasterDetailsView,
49+
MasterDetailsViewItem,
50+
MasterDetailsViewItemMaster,
51+
MasterDetailsViewItemDetails,
52+
Text
53+
} from 'react-desktop/windows';
4854

4955
export default class extends Component {
5056
static defaultProps = {
@@ -64,14 +70,14 @@ export default class extends Component {
6470

6571
renderItem(master, details) {
6672
return (
67-
<MasterDetailsView.Item>
68-
<MasterDetailsView.Item.Master push>
73+
<MasterDetailsViewItem>
74+
<MasterDetailsViewItemMaster push>
6975
{master}
70-
</MasterDetailsView.Item.Master>
71-
<MasterDetailsView.Item.Details background>
76+
</MasterDetailsViewItemMaster>
77+
<MasterDetailsViewItemDetails background>
7278
<Text padding="20px" color="white">{details}</Text>
73-
</MasterDetailsView.Item.Details>
74-
</MasterDetailsView.Item>
79+
</MasterDetailsViewItemDetails>
80+
</MasterDetailsViewItem>
7581
);
7682
}
7783
}

docs/windows/nav-pane.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ verticalAlignment | string | Sets the vertical alignment of t
3737

3838
```jsx
3939
import React, { Component } from 'react';
40-
import { NavPane, Text } from 'react-desktop/windows';
40+
import { NavPane, NavPaneItem, Text } from 'react-desktop/windows';
4141

4242
export default class extends Component {
4343
static defaultProps = {
@@ -64,18 +64,18 @@ export default class extends Component {
6464

6565
renderItem(title, content) {
6666
return (
67-
<NavPane.Item
67+
<NavPaneItem
6868
title={title}
6969
icon={this.renderIcon(title)}
70-
requestedTheme="light"
70+
theme="light"
7171
background="#ffffff"
7272
selected={this.state.selected === title}
7373
onSelect={() => this.setState({ selected: title })}
7474
padding="10px 20px"
7575
push
7676
>
7777
<Text>{content}</Text>
78-
</NavPane.Item>
78+
</NavPaneItem>
7979
);
8080
}
8181

docs/windows/text-input.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default class extends Component {
2828
theme: 'light'
2929
};
3030

31-
change = () => console.log(this.refs.input.value);
31+
handleChange = e => console.log(e.target.value);
3232

3333
render() {
3434
return (
@@ -39,8 +39,7 @@ export default class extends Component {
3939
background
4040
label="My Input"
4141
placeholder="My Input"
42-
defaultValue="Hello!"
43-
onChange={this.change}
42+
onChange={this.handleChange}
4443
/>
4544
);
4645
}

0 commit comments

Comments
 (0)