npm.io
0.0.19 • Published 3 years ago

@ray-js/components-ty-cell

Licence
MIT
Version
0.0.19
Deps
2
Size
62 kB
Vulns
0
Weekly
0

English | 简体中文

@ray-js/components-ty-cell

latest download

Tuya Style Cell

Installation

$ npm install @ray-js/components-ty-cell
# or
$ yarn add @ray-js/components-ty-cell

Usage

import React from 'react';
import { Checkbox, Text, View } from '@ray-js/components';
import List from '@ray-js/components-ty-cell';
import styles from './index.module.less';

export default function Home() {
  return (
    <List
      dataSource={[
        {
          title: 'Title',
        },
        {
          title: 'Title',
          content: 'Label',
        },
        {
          title: 'Title',
          content: <Icon type="icon-right" size={24} color="rgba(0,0,0,0.2)" />,
        },
        {
          title: 'Title',
          content: (
            <>
              Label
              <Icon
                style={{ marginLeft: '8rpx' }}
                type="icon-right"
                size={24}
                color="rgba(0,0,0,0.2)"
              />
            </>
          ),
        },
        {
          title: 'Title',
          content: <Icon type="icon-checkmark" size={24} color="#2B7AFF" />,
        },
        {
          title: 'Title',
          content: <Icon type="icon-checkmark" size={24} className={styles.iconColor} />,
        },
        {
          title: 'Title',
          content: <Switch />,
        },
        {
          title: (
            <>
              <Icon type="icon-a-sunmaxfill" size={24} color="#2B7AFF" />
              Title
            </>
          ),
          content: <Switch />,
        },
        {
          title: (
            <>
              <Icon type="icon-a-sunmaxfill" size={24} color="#2B7AFF" />
              Title
            </>
          ),
          content: (
            <>
              Label
              <Icon type="icon-right" size={24} className={styles.iconColor} />
            </>
          ),
        },
      ]}
    />
  );
}