A10 GUI Widgets

Introduction

Widgets are common components that are reused across all A10 applications. This widget library is an extension of our a10-gui-framework that facilitates the A10 GUI development process. With the sharable widgets under the same framework, different apps can utilize the same structure and codebase. This promotes the maximization of consistency, modularity, and maintainability of A10 applications.

Repository path:

https://github.com/a10networks/a10-gui-widgetsarrow-up-right

Install

1.Add a10-gui-widgets to the dependency of package.json

 "dependencies": {
    "a10-gui-widgets": "git https://github.com/a10networks/a10-gui-widgets
},

2.Install a10-gui-widgets using npm install

3.To use the a10-gui-widgets in your app:

Take the simple A10Button as an example.

import { A10Component } from 'a10-gui-framework'
import { A10Button } from 'a10-gui-widgets'

class Demo extends A10Component {
  render() {
    return <A10Button>test</A10Button>
  }
}
export default Demo

4.Importing widget css style

There are two ways to import the css of a10-gui-widget in your code.

By Less

NOTE ~ means importing the less file from node_modules

By css

NOTE: ~ means importing the less file from node_modules

How to use

Widget contribution

1. Create a widget

First, create a widget package in src, for example:

IMPORTANT When partially importing some widgets from our a10-gui-widgets library, please DO NOT import the styles/index.less of the widget in index.tsx. We have a script (npm build) to collect all less files of all widgets into the root index.less ('~a10-gui-widgets/dist/index.less').

NOTE: Please write your code in alphabetical order.

2. Export widget component and props in src/index.tsx

These widgets are maintained by A10 devs. PRs are welcomed.

  • Create a component

  • Wrap the component up with the HOC createWidget from a10-gui-framework

For example, a simple widget:

3. Compile Typescript into JavaScript (ES5)

NOTE: Please write the code in alphabetical order.

4. Write storybook for the widget

Add NewWidget folder in stories, and create index.story.js file in NewWidget folder

NOTE: The code of storybook is created by JavaScript (ES6) instead of TypeScript.

Import the new story book in stories/index.stories.js

Run the storybook npm run storybook and you will see it at http://localhost:6006. __

NOTE: Please write the code in alphabetical order.

5. Git Push and create a PR.

That's it! Please bear in mind to call npm build before submitting your code, and then create a PR for code review at a10-gui-widgetsarrow-up-right.

Widgets

General

A10Buttonarrow-up-right A10Iconarrow-up-right

Layout

A10Gridarrow-up-right A10Layoutarrow-up-right

A10Affixarrow-up-right A10Breadcrumbarrow-up-right A10Dropdownarrow-up-right A10DropdownMenuarrow-up-right A10Menuarrow-up-right A10MenuPopoverarrow-up-right A10Paginationarrow-up-right A10Stepsarrow-up-right A10Explorerarrow-up-right

Data Entry

A10AutoCompletearrow-up-right A10Checkboxarrow-up-right A10Cascaderarrow-up-right A10CompoundConfigListarrow-up-right A10CompoundTable arrow-up-right A10ConfigListarrow-up-right A10DatePickerarrow-up-right A10Formarrow-up-right A10InputNumberarrow-up-right A10Inputarrow-up-right A10ListInputarrow-up-right A10Mentionarrow-up-right A10Ratearrow-up-right A10Radioarrow-up-right A10Switcharrow-up-right A10Silderarrow-up-right A10Selectarrow-up-right A10TreeSelectarrow-up-right A10Transferarrow-up-right A10TimePickerarrow-up-right A10Upload arrow-up-right

Data Display

A10Avatararrow-up-right A10Badgearrow-up-right A10Carouselarrow-up-right A10Cardarrow-up-right A10Calendararrow-up-right A10Chartarrow-up-right A10Commentarrow-up-right A10ContextMenu arrow-up-right A10Collapsearrow-up-right A10Datatablearrow-up-right A10Diffarrow-up-right A10DnDTablearrow-up-right A10DnDBasicarrow-up-right A10Listarrow-up-right A10LogFilterBararrow-up-right A10LogSearchBararrow-up-right A10MultiItemarrow-up-right A10MultiSearcharrow-up-right A10Popoverarrow-up-right A10SearchableSelectorarrow-up-right A10SearchBar arrow-up-rightA10Tablearrow-up-right A10Tabsarrow-up-right A10Tagarrow-up-right A10Timelinearrow-up-right A10Tooltiparrow-up-right A10Treearrow-up-right

Feedback

A10Alertarrow-up-right A10Drawerarrow-up-right A10Modalarrow-up-right A10Messagearrow-up-right A10Notificationarrow-up-right A10Progressarrow-up-right A10Popconfirmarrow-up-right A10SlidingPagearrow-up-right A10Spinarrow-up-right A10Skeletonarrow-up-right

Other

A10Anchorarrow-up-right A10BackToparrow-up-right A10ConfigProviderarrow-up-right A10Dividerarrow-up-right A10LocaleProviderarrow-up-right

Last updated

Was this helpful?