ES6/TypeScript module

Since FancyGrid supports CommonJS, it can be loaded as an ES6 module with the use of transpilers.
Two common transpilers are Babel and TypeScript.
These have different interpretations of a CommonJS module, which affects your syntax.
The following examples presumes you are using npm to install FancyGrid.

Example: Babel


import Fancy from 'fancygrid';

// Generate the grid
Fancy.Grid({
  // config
});

// Generate the form
new Fancy.Form({
  //config
});

// Generate the tabs
new Fancy.Tab({
  //config
});

Example: TypeScript


import * as Fancy from 'fancygrid';

// Generate the grid
Fancy.Grid({
  // config
});

// Generate the form
new Fancy.Form({
  //config
});

// Generate the tabs
new Fancy.Tab({
  //config
});
`