Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove SegmentedControlIOS images #1774

Merged
merged 3 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed docs/assets/SegmentedControlIOS/enabled.png
Binary file not shown.
Binary file removed docs/assets/SegmentedControlIOS/example.gif
Binary file not shown.
Binary file removed docs/assets/SegmentedControlIOS/momentary.gif
Binary file not shown.
Binary file removed docs/assets/SegmentedControlIOS/tintColor.png
Binary file not shown.
50 changes: 34 additions & 16 deletions docs/segmentedcontrolios.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,40 @@ The selected index can be changed on the fly by assigning the selectedIndex prop

## Example

```jsx
<SegmentedControlIOS
values={['One', 'Two']}
selectedIndex={this.state.selectedIndex}
onChange={(event) => {
this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex});
}}
/>
```SnackPlayer name=SegmentedControlIOS%20Example&supportedPlatforms=ios
import React, { useState } from "react";
import { SegmentedControlIOS, StyleSheet, Text, View } from "react-native";

export default App = () => {
const [index, setIndex] = useState(0);
return (
<View style={styles.container}>
<SegmentedControlIOS
values={['One', 'Two']}
selectedIndex={index}
onChange={(event) => {
setIndex(event.nativeEvent.selectedSegmentIndex);
}}
/>
<Text style={styles.text}>
Selected index: {index}
</Text>
</View>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
padding: 24,
justifyContent: "center"
},
text: {
marginTop: 24
}
});
```

<center><img src="/docs/assets/SegmentedControlIOS/example.gif" width="360"></img></center>

---

# Reference
Expand All @@ -41,8 +63,6 @@ If false the user won't be able to interact with the control. Default value is t
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/enabled.png" width="360"></img></center>

---

### `momentary`
Expand All @@ -53,8 +73,6 @@ If true, then selecting a segment won't persist visually. The `onValueChange` ca
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/momentary.gif" width="360"></img></center>

---

### `onChange`
Expand Down Expand Up @@ -89,14 +107,14 @@ The index in `props.values` of the segment to be (pre)selected.

### `tintColor`

> **Note:** `tintColor` is not supported on the iOS 13+.

Accent color of the control.

| Type | Required |
| ------ | -------- |
| string | No |

<center><img src="/docs/assets/SegmentedControlIOS/tintColor.png" width="360"></img></center>

---

### `values`
Expand Down
8 changes: 0 additions & 8 deletions website/versioned_docs/version-0.52/segmentedcontrolios.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ The selected index can be changed on the fly by assigning the selectedIndex prop
/>
```

<center><img src="/docs/assets/SegmentedControlIOS/example.gif" width="360"></img></center>

### Props

- [View props...](view.md#props)
Expand All @@ -50,8 +48,6 @@ If false the user won't be able to interact with the control. Default value is t
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/enabled.png" width="360"></img></center>

---

### `momentary`
Expand All @@ -62,8 +58,6 @@ If true, then selecting a segment won't persist visually. The `onValueChange` ca
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/momentary.gif" width="360"></img></center>

---

### `onChange`
Expand Down Expand Up @@ -104,8 +98,6 @@ Accent color of the control.
| ------ | -------- |
| string | No |

<center><img src="/docs/assets/SegmentedControlIOS/tintColor.png" width="360"></img></center>

---

### `values`
Expand Down
8 changes: 0 additions & 8 deletions website/versioned_docs/version-0.58/segmentedcontrolios.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ The selected index can be changed on the fly by assigning the selectedIndex prop
/>
```

<center><img src="/docs/assets/SegmentedControlIOS/example.gif" width="360"></img></center>

### Props

- [View props...](view.md#props)
Expand All @@ -50,8 +48,6 @@ If false the user won't be able to interact with the control. Default value is t
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/enabled.png" width="360"></img></center>

---

### `momentary`
Expand All @@ -62,8 +58,6 @@ If true, then selecting a segment won't persist visually. The `onValueChange` ca
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/momentary.gif" width="360"></img></center>

---

### `onChange`
Expand Down Expand Up @@ -104,8 +98,6 @@ Accent color of the control.
| ------ | -------- |
| string | No |

<center><img src="/docs/assets/SegmentedControlIOS/tintColor.png" width="360"></img></center>

---

### `values`
Expand Down
48 changes: 32 additions & 16 deletions website/versioned_docs/version-0.60/segmentedcontrolios.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,40 @@ The selected index can be changed on the fly by assigning the selectedIndex prop

## Example

```jsx
<SegmentedControlIOS
values={['One', 'Two']}
selectedIndex={this.state.selectedIndex}
onChange={(event) => {
this.setState({selectedIndex: event.nativeEvent.selectedSegmentIndex});
}}
/>
```SnackPlayer name=SegmentedControlIOS%20Example&supportedPlatforms=ios
import React, { useState } from "react";
import { SegmentedControlIOS, StyleSheet, Text, View } from "react-native";

export default App = () => {
const [index, setIndex] = useState(0);
return (
<View style={styles.container}>
<SegmentedControlIOS
values={['One', 'Two']}
selectedIndex={index}
onChange={(event) => {
setIndex(event.nativeEvent.selectedSegmentIndex);
}}
/>
<Text style={styles.text}>
Selected index: {index}
</Text>
</View>
);
};

const styles = StyleSheet.create({
container: {
flex: 1,
padding: 24,
justifyContent: "center"
},
text: {
marginTop: 24
}
});
```

<center><img src="/docs/assets/SegmentedControlIOS/example.gif" width="360"></img></center>

---

# Reference
Expand All @@ -42,8 +64,6 @@ If false the user won't be able to interact with the control. Default value is t
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/enabled.png" width="360"></img></center>

---

### `momentary`
Expand All @@ -54,8 +74,6 @@ If true, then selecting a segment won't persist visually. The `onValueChange` ca
| ---- | -------- |
| bool | No |

<center><img src="/docs/assets/SegmentedControlIOS/momentary.gif" width="360"></img></center>

---

### `onChange`
Expand Down Expand Up @@ -96,8 +114,6 @@ Accent color of the control.
| ------ | -------- |
| string | No |

<center><img src="/docs/assets/SegmentedControlIOS/tintColor.png" width="360"></img></center>

---

### `values`
Expand Down