(Translated by https://www.hiragana.jp/)
GitHub - react-native-studio/react-native-switchbutton: 提供IOS样式的跨平台的Switch组件
Skip to content

提供ていきょうIOS样式てきまたが平台ひらだいてきSwitch组件

License

Notifications You must be signed in to change notification settings

react-native-studio/react-native-switchbutton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-switchbuttonnpm version

いち个IOS样式てきまたが平台ひらだい(cross-platform)平台ひらだいてきswitch组件

第一步だいいっぽ

工程こうてい录下运行:
npm install --save react-native-switchbutton
あるもの(やめ经安そうりょうyarn):
yarn add react-native-switchbutton

だい使用しよう

ざい工程こうていちゅう导入:

import Switch from 'react-native-switchbutton';

//使用しよう方法ほうほうRNかんかたてきSwitch类似,
<Switch/>

属性ぞくせい

View props... 

disabled bool 

如果为true,这个组件不能ふのう进行交互こうご

onValueChange function 

とう值改变的时候调用此回调函すうまいりすう为新てき值。

value bool 

表示ひょうじ此开关是开。だま认为false(关闭じょう态)。

onTintColor ColorPropType 

开启じょう态时てき背景はいけい颜色。

thumbTintColor ColorPropType 

开关じょう圆形按钮てき背景はいけい颜色。

tintColor ColorPropType 

关闭じょう态时てき边框颜色(iOS)ある背景はいけい颜色(Android)

useNative bool

使用しようRNかんかた提供ていきょうてきswitch

tintColorUsage string

tintColorてき使用しよう,borderbackgroundきょう选择,仅在useNative为false时有效ゆうこう

useNativeDriver

使用しよう原生げんせい动画,仅在useNative为false时有效ゆうこう

しめせれい

图片名称

About

提供ていきょうIOS样式てきまたが平台ひらだいてきSwitch组件

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published