0.0.20 • Published 5 years ago

aix-ui-library v0.0.20

Weekly downloads
22
License
ISC
Repository
-
Last release
5 years ago

AI X-Lab Shared UI Library

React component library + Other shared UI resources for AI X Lab

Getting Started

To get started, simply install ensure the node package and relevant package dependencies are installed.

Prerequisites

Let's start by making sure the required dependencies are installed.

Here are the packages you would need:

Installing

First, install the aix-ui-library node package:

npm install aix-ui-library

Next, in your top level jsx file (usually index.jsx), include the required stylesheets:

import 'aix-ui-library/src/style/style.css'
import {SiteButton} from 'aix-ui-library';

This line will include SiteButton into the relevant jsx file.

Elements

SiteButton

The SiteButton component is an inline-block display button with the ability to hyperlink or trigger a callback function when clicked.

NameTypeDefaultDescription
buttonLinkString#hyperlink for the button
onClickfunctionnullcallback function to customize button behavior
classNameCSS classnullbutton css class style
newTabBooleanfalsewhether to open the hyperlink in a new tab or not

SiteNavItem

The navigation item component with the ability to hyperlink or trigger a callback function when clicked.

NameTypeDefaultDescription
itemLinkString#hyperlink for the nav item
onClickfunctionnullcallback function to customize item behavior
classNameCSS classnullitem css class style
newTabBooleanfalsewhether to open the hyperlink in a new tab or not

SiteFooterItem

The footer item component with the ability to hyperlink or trigger a callback function when clicked.

NameTypeDefaultDescription
itemLinkString#hyperlink for the nav item
onClickfunctionnullcallback function to customize item behavior
classNameCSS classnullitem css class style
newTabBooleanfalsewhether to open the hyperlink in a new tab or not

Components

SiteNavbar

SiteNavbar accepts SiteNavItems to append navigation links/buttons. Call SiteNavbar as below:

 <SiteNavbar>
	 <SiteNavItem onClick={callback}>Share</SiteNavItem>
     <SiteNavItem itemLink="#######">About</SiteNavItem>
 </SiteNavbar>
NameTypeDefaultDescription
containerClassCSSClassnullcss class style for the navbar

SiteFooter

SiteFooter accepts SiteFooterItems to append footer links. Call SiteFooter as below:

 <SiteFooter>
	 <SiteFooterItem onClick={callback}>Terms of Use</SiteFooterItem>
     <SiteFooterItem itemLink="#######">License</SiteFooterItem>
 </SiteFooter>

Updating

Updating to the latest version is easy!

npm install aix-ui-library@latest
0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

6 years ago

0.0.15

6 years ago

0.0.14

6 years ago

0.0.13

6 years ago

0.0.11

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago