Icon

Icon dùng để dùng biểu tượng Ant Design hoặc đăng ký biểu tượng tùy chỉnh.

Cách dùng cơ bản

import React from 'react';
import { Icon } from '@nocobase/client-v2';
import { Space } from 'antd';

export default function IconDemo() {
  return (
    <Space size={16}>
      <Icon type="SettingOutlined" style={{ fontSize: 24 }} />
      <Icon type="DatabaseOutlined" style={{ fontSize: 24 }} />
      <Icon type="CloudServerOutlined" style={{ fontSize: 24 }} />
    </Space>
  );
}

API

Tham sốKiểuMô tả
typestringIcon name
componentReact.ComponentTypeThành phần SVG tùy chỉnh