Giter Club home page Giter Club logo

simplecontrols's Introduction

Description

This project provides re-usable components (Autocomplete, CheckboxList, DropdownList, Drawboard) components for quickly prototyping react applications.

alt text

Controls

  • Autocomplete - Simple auto complete functionality for react applications.
  • CheckboxList - Simple checkbox list that fires selected and deselected events (currently unstyled)
  • DropdownList - Simple dropdownlist that fires events on change (Currently unstyled)
  • Drawboard - Simple canas that emits events that can be forwarded onto realtime endpoints such as signalR (WIP)

Usage

import { Autocomplete, CheckboxList, DropdownList, Drawboard  } from "simplereactcontrols";
<Autocomplete
  onFetchData={(searchval, callback) =>
    callback([
      { DisplayText: "Your AutoComplete Result", SomeProperty: "Random Prop" },
    ])
  }
  onSelectedResult={(item) => {
    console.log(item);
  }}
  searchText="This is searchtext"
/>
<CheckboxList
  data={[
    { DisplayText: "Label1", DefaultValue: false, Value: 2 },
    { DisplayText: "label2", DefaultValue: false, Value: 1 },
    { DisplayText: "Label2", DefaultValue: false, Value: 2 },
    { DisplayText: "Label4", DefaultValue: false, Value: 3 },
    { DisplayText: "Label5", DefaultValue: false, Value: 2 },
  ]}
  onSelect={(e, item) => console.log(item)}
  onDeselect={(e, item) => console.log(item)}
/>
<DropdownList DefaultValue="Pink" data={[{DisplayText: "Red",  value: "Red"},
                           {DisplayText: "Green",  value: "Green"},
                           {DisplayText: "Blue",  value: "Blue"},
                           {DisplayText: "Pink",  value: "Pink"},
                           {DisplayText: "Purple" , value: "Purple"}]}
                           onSelect={(e,item) => console.log(item)}
                           />
/>
<Drawboard  />
/>

Styling

The current styling used follows a 7-1 sass design pattern. Controls come with a basic style - this can be extended by overriding the sass variables.

Tests

SimpleReactControls Tests

Tests are currently WIP. Tests Have been created under **tests**. The indended pattern is one control per file.

Contributing

Please feel free to fork or extend this project, PR'ing your changes (https://github.com/joytechu/simplecontrols.git)

Changelog

https://github.com/joytechu/simplecontrols/blob/master/CHANGELOG.md

Road Map

The following functionality is currently being developed.

  • Dropdown List Styling
  • Checkbox list styling, and media query to handle display flex/block for different screen sizes.
  • Unit tests.
  • Drawboard - WIP

Last Updated

20/04/2020

simplecontrols's People

Contributors

joytechu avatar

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.