mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add option for both min/max track image.
Summary: This is a followup to PR #3850 but now separates min/max track images into different properties. Closes #4476 Add examples for `minimumTrackTintColor`, `maximumTrackTintColor`, `minimumTrackImage`, `maximumTrackImage` to UIExplorer. Closes https://github.com/facebook/react-native/pull/4586 Reviewed By: svcscm Differential Revision: D2779193 Pulled By: nicklockwood fb-gh-sync-id: 0510a0f496816baacdd0d4be0f3cd3a63a5a9865
This commit is contained in:
committed by
facebook-github-bot-0
parent
41875eec47
commit
4cb775286c
@@ -84,10 +84,38 @@ exports.examples = [
|
||||
return <SliderExample step={0.25} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Custom min/max track tint color',
|
||||
render(): ReactElement {
|
||||
return (
|
||||
<SliderExample
|
||||
minimumTrackTintColor={'red'}
|
||||
maximumTrackTintColor={'green'}
|
||||
/>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Custom thumb image',
|
||||
render(): ReactElement {
|
||||
return <SliderExample thumbImage={require('image!uie_thumb_big')} />;
|
||||
return <SliderExample thumbImage={require('./uie_thumb_big.png')} />;
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Custom track image',
|
||||
render(): ReactElement {
|
||||
return <SliderExample trackImage={require('./slider.png')} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
title: 'Custom min/max track image',
|
||||
render(): ReactElement {
|
||||
return (
|
||||
<SliderExample
|
||||
minimumTrackImage={require('./slider-left.png')}
|
||||
maximumTrackImage={require('./slider-right.png')}
|
||||
/>
|
||||
);
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user