Chuyển tới nội dung chính

Switch

Tạo giao diện cho phép người dùng thực hiện bật, tắt một chức năng

Properties

Switch

NameTypeDefaultDescription
labelstringThêm nhãn cho switch
sizeSwitchSizeKích thước của switch
wrapperClassNamestringThêm class name cho wrapper của switch

Type

SwitchSize

NameDescription
"small"Size small
"medium"Size medium

Example

import React from "react";
import { Page, Switch, Text } from "zmp-ui";

export default function HomePage(props) {
return (

<Text.Title size="small">Switch</Text.Title>
Medium Size
<div>


<div>


<div>


<div>


Small Size
<div>


<div>


<div>


<div>



);
}