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
| Name | Type | Default | Description |
|---|---|---|---|
| label | string | Thêm nhãn cho switch | |
| size | SwitchSize | Kích thước của switch | |
| wrapperClassName | string | Thêm class name cho wrapper của switch |
Type
SwitchSize
| Name | Description |
|---|---|
| "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>
);
}