ArrowCard

Code demo

Studio

import { ClassicArrowCard } from 'tuya-panel-classic-kit';
import TuyaRNSvgs from 'tuya-panel-kit/lib/components/iconfont/svg/defaultSvg';
<ClassicArrowCard icon={TuyaRNSvgs.power} onPress={() => console.log('hhhhhh')} />
<ClassicArrowCard
icon={TuyaRNSvgs.power}
subText="switch card"
style={{ marginTop: 20 }}
padding={[cx(12), cx(28), cx(12), cx(20)]}
/>

Nordic

import { NordicArrowCard } from 'tuya-panel-nordic-kit';
import TuyaRNSvgs from 'tuya-panel-kit/lib/components/iconfont/svg/defaultSvg';
<NordicArrowCard icon={TuyaRNSvgs.power} />;

Acrylic

import { AcrylicArrowCard } from 'tuya-panel-acrylic-kit';
import TuyaRNSvgs from 'tuya-panel-kit/lib/components/iconfont/svg/defaultSvg';
<AcrylicArrowCard icon={TuyaRNSvgs.power} />;

API

ClassicArrowCard

NameDescriptionTypeDefault
styleOutermost container styleStylePropnull
backgroundColorThe background colorstring#FFF
padding[paddingTop, paddingRight, paddingBottom, paddingLeft]number[]null
widthWidth of the containernumbercx(316)
radiusRadius of the containernumbercx(14)
textThe titlestring'Switch Card'
fontColorThe title colorstring#3D3D3D
fontSizeThe title sizenumbercx(15)
fontWeightThe title weightstring | number400
textStyleThe title styleStylePropnull
subTextsubtitlestringnull
subFontColorSubtitle colorstringrgba(61, 61, 61, 0.5)
subFontSizeSubtitle sizenumbercx(14)
subFontWeightSubtitle weightstring | number400
subTextStyleSubtitle styleStylePropnull
switchSizeSwitch size{ width?: number; height?: number; activeSize?: number; margin?: number; }{ width: cx(40), height: cx(24), activeSize: cx(20), margin: cx(2) }
switchStyleSwitch the styleStylePropnull
iconStyleIcon styleStylePropnull
typeThe card type is a text card, which is not transmitted by default"switch" | "arrow"null
valueText on the right side of the cardstring | booleannull
valueColorColor of text on the right side of the cardstringnull
valueSizeSize of text on the right side of the cardnumbernull
valueFontWeightWeight of text on the right side of the cardstring | numbernull
valueStyleStyle of text on the right side of the cardStylePropnull
unitUnit on right side of cardstringnull
unitSizeUnit size on the right side of the cardnumbernull
unitColorUnit color on the right side of the cardstringnull
unitWeightUnit weight on the right side of the cardstring | numbernull
unitStyleUnit style on the right side of the cardStylePropnull
arrowSizeSize of arrow on right side of cardnumbercx(12)
arrowColorColor of arrow on right side of cardstringrgba(0, 0, 0, 0.25)
childrenCustom components on the right of the cardReactNodenull
disabledWhether the card is disabledbooleantrue
onPressShort press() => voidnull
onLongPressLong press() => voidnull
millisecondsLong press the intervalnumber500
iconicon svg pathstring--
imageimage url,icon has a higher prioritystring--
iconSizeicon sizenumbercx(24)
iconBgSizeicon background sizenumbercx(50)
showIconWhether to display iconbooleantrue
showIconBgWhether to display icon backgroundbooleantrue
iconColoricon colorstring#fff
iconBgColoricon background color, only rgb、rgba or hexBackgroundType#158CFB
iconBgRadiusicon background radiusnumbercx(50)
imageRadiusimage radiusnumber0
tuya07:31