How to use the @antv/x6-components.Toolbar.Item function in @antv/x6-components

To help you get started, we’ve selected a few @antv/x6-components examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github antvis / x6 / examples / x6-example-features / src / pages / flowchart / toolbar.tsx View on Github external
render() {
    const Item = Toolbar.Item
    const Group = Toolbar.Group

    return (
      
            变更流程
            流程回滚
          
        }
      >
        
          {(this.graph.view.scale * 100).toFixed(0)}%
github antvis / x6 / examples / x6-example-drawio / src / pages / graph / toolbar.tsx View on Github external
import React from 'react'
import { SketchPicker, ColorResult } from 'react-color'
import { Cell } from '@antv/x6'
import { Toolbar, Icon, Menu } from '@antv/x6-components'
import { fetchEditor } from '../'
import { Editor } from '../editor'

import './toolbar.less'

const Item = Toolbar.Item
const Group = Toolbar.Group

export class GraphToolbar extends React.PureComponent<
  GraphToolbar.Props,
  GraphToolbar.State
> {
  state: GraphToolbar.State = {
    scale: 1,
    editor: null,
    canUndo: false,
    canRedo: false,
    selectedCells: [],
  }

  componentDidMount() {
    fetchEditor().then(editor => {
github antvis / x6 / examples / x6-example-components / src / pages / toolbar.tsx View on Github external
import React from 'react'
import { message } from 'antd'
import { Toolbar, Menu } from '@antv/x6-components'

const Item = Toolbar.Item
const Group = Toolbar.Group

export default class ToolbarExample extends React.PureComponent {
  onClick = (name: string) => {
    message.success(`${name} clicked`, 10)
  }

  onItemClick = () => {
    this.onClick('undo')
  }

  renderZoomDropdown() {
    const MenuItem = Menu.Item
    const Divider = Menu.Divider

    return (

@antv/x6-components

React components for building x6 editors

MIT
Latest version published 4 years ago

Package Health Score

73 / 100
Full package analysis