Socket View

Last Updated on : 2021-08-30 03:50:15download

SocketView

SocketView is socket components

Preview

Socket View

Properties

Field name Type Description Defaults
socketWrapperStyle Style Outer style {}
socketBackgroundImage String Socket background image ‘http://images.tuyacn.com/smart/panelos/common/imgs/1588928982565_dc-bg@3x.png’
socketBackgroundImageSize Style Socket background picture style { width: 240, height: 240 }
socketImage String Socket picture ‘http://images.tuyacn.com/smart/panelos/common/imgs/1588929002104_dc-ck-1@3x.png’
socketImageSize Style Socket picture style { width: 140, height: 140 }
onPress Func Socket click callback null

Sample code

import React from 'react'
import { SocketView } from '@tuya/tuya-panel-electrician-sdk'

export default class Scene extends Component { 
  render() { 
    return <SocketView  socketImageSize={{ width: 150, height: 150 }}  />; 
  } 
}