Git Product home page Git Product logo

kaid's Introduction

kaid

UI Components for KaiOS 2.5, react version

Components

Curren support components:

  • header
  • empty
  • dialog
  • menu
  • softkey
  • list
  • list-item
  • service
  • simple-navigation-helper
  • search header
  • tab bar
  • read more
  • seperator
  • progress
  • slider
  • button
  • input
  • toast
  • date picker
  • time picker
  • loading

Site

use webpack-dev-server as the quickly develop basic of kaid components.

  1. run yarn start to start server
  2. use Firefox or Chrome open http://localhost:8001/ ; or if this port has been occupied, modify the port in webpack.config.js

Test

use test framework Jest & enzyme

  1. run yarn test to test
  2. use yarn test -u if need update snapshot

Usage

tab

import { Tab, TabPanel }  from 'kaid';

export default function MyComponent() {
  return (
    <>
    <Tab position="top">
      <TabPanel key="apple" title="header1">
        <div tabIndex="-1">apple number 1</div>
      </TabPanel>
      <TabPanel key="orange" title="header3">
        <div tabIndex="-1">orange number 2</div>
      </TabPanel>
      <TabPanel key="banana" title="header3">
        <div tabIndex="-1">banana number 3</div>
      </TabPanel>
    </Tab>
    </>
  );
}
  • import components Tab, TabPanel from kaid

  • <TabPanel /> MUST have a focusable child element or component as content.

  • use position attribute on <Tab /> change the tab style.

  • top (default)

  • bottom

  • left

  • right

  • <TabPanel /> attribute

    • key: non-repeating string value in current <Tab />
    • title: tab header string will shown

kaid's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.