@antv/graphin-icons
graphin icon fonts
Last updated 8 months ago by pomelo-nwu .
ISC · Original npm · Tarball · package.json
$ cnpm install @antv/graphin-icons 
SYNC missed versions from official npm registry.

@antv/graphin-icons

中文

Graphin's font icons

Usage

import React from 'react';
import ReactDOM from 'react-dom';
import Graphin, { Utils } from '@antv/graphin';
import { Toolbar } from '@antv/graphin-components';

// Do not forget to import CSS
import '@antv/graphin/dist/index.css';
import '@antv/graphin-components/dist/index.css';

// font icon
import fontLoader from '@antv/graphin-icons';
import '@antv/graphin-icons/dist/index.css';

/** 加载 font icons **/
Graphin.registerIcon('graphin', fontLoader);
const data = Utils.mock(10).graphin();

data.nodes.forEach((node) => {
  node.style.icon = {
    fontFamilay: 'graphin',
    value: 'eye',
  };
});

const App = () => {
  return (
    <div className="App">
      <Graphin data={data}>
        <Toolbar />
      </Graphin>
    </div>
  );
};

const rootElement = document.getElementById('root');
ReactDOM.render(<App />, rootElement);

Current Tags

  • 1.0.0                                ...           latest (8 months ago)

1 Versions

  • 1.0.0                                ...           8 months ago
Downloads
Today 23
This Week 24
This Month 262
Last Day 1
Last Week 98
Last Month 394
Dependencies (0)
None
Dev Dependencies (1)

Copyright 2014 - 2017 © taobao.org |