Icon

Icon は、Ant Design アイコンを使う、またはカスタムアイコンを登録するためのコンポーネントです。

基本的な使い方

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

パラメータ説明
typestringアイコン名
componentReact.ComponentTypeカスタム SVG コンポーネント