New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react-bulma-board

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bulma-board

Create boards to display lists and also drag and drop items back and forth while maintaing the state of the lists.

latest
Source
npmnpm
Version
0.1.0
Version published
Maintainers
1
Created
Source

react-bulma-board

Create boards to display lists and also drag and drop items back and forth while maintaing the state of the lists.

Installation

npm i react-bulma-board --save

Sample Code

import React, { Component } from "react";
import { render } from "react-dom";
import { DragAndDropBoard } from "react-bulma-board";
import "./bulma.css";

class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      boardContent: {
        "To-Do": [
          "Implement item specific actions",
          "Trello clone",
          "Include stateful components"
        ],
        WIP: ["Footer implementation", "write test cases", "optimization"],
        Completed: ["Board", "Drag and Drop", "default Props", "State Handling"]
      },
      options: {
        boardColors: ["#FF9800", "#03A9F4", "#8BC34A"],
        innerItemColor: ["#FFE0B2", "#B3E5FC", "#DCEDC8"],
        roundedCorner: true,
        innerItemsRoundedCorner: true,
        showKeyIndex: true
      }
    };
  }

  handleState(data) {
    this.setState({
      data
    });
  }

  render() {
    const { boardContent, options } = this.state;
    return (
      <DragAndDropBoard
        numberOfBoards={3}
        boardContent={boardContent}
        onDrop={data => this.handleState(data)}
        options={options}
      />
    );
  }
}

render(<App />, document.getElementById("root"));

Props

nametyperequireddescription
numberOfBoardsNumbertrueThe number of boards to be displayed
boardContentObjecttrueLists to be passed on to the boards are to be represented in key-value pairs
optionsObjecttrueDisplay options, explained in the next section.

Options

nametyperequireddescriptionexampleValuedefaultValue
boardColorsarrayfalseBoard's background color, applied to each board in the passed order["#FF9800", "#03A9F4", "#8BC34A"]#fff
innerItemColorarrayfalseInner list item's background color, applied to each board in the passed order["#FFE0B2", "#B3E5FC", "#DCEDC8"]#fff
roundedCornersbooleanfalseToggle between rounded cornerstruefalse
innerItemsroundedCornersbooleanfalseToggle between rounded cornerstruefalse
showKeyIndexbooleanfalseMake the list items as numbered liststruefalse

Release History

  • 0.1.0
    • Render Boards | Stateful List Items | Drag and Drop List Items

Author

Raghavendran Ramesh (BeardDude)

-ramesh.raghaven@gmail.com

Distributed under the MIT license. See LICENSE for more information.

License

MIT License

References

This component has been created only because of the availability of some cool references that are listed below,

Keywords

bulma

FAQs

Package last updated on 20 Nov 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts