0.2.1 • Published 1 year ago

hadock404-plugin v0.2.1

Weekly downloads
-
License
-
Repository
-
Last release
1 year ago

DropDown plugin

hadock404-plugin is a simple ready to integrate component made in React

Installation

Simply run the following command

npm i hadock404-plugin

Integration

React Integration:

import React, { useState } from 'react';
import { HaDock404Plugin } from 'hadock404-plugin';

......

const [value, setValue] = useState(null)
const [data, setData] = useState({.......})

......

function manipulateData(e) {
    setData(data => ({...data, ...{'Key':`${e.getAttribute('data')}`}}))
}

......

<HaDock404Plugin
    dropdownMessage={'Select'}
    onDataReceived={manipulateData}
    tabWordsList={[{word: 'Example'}]}
    value={value}
    onChange={setValue}>
</HaDock404Plugin>

Options

The options are passed in as props when used as a React component.

OptionTypeDescription
dropdownMessagestringMessage appearing in the dropdown.
dropdownBackgroundColorstringColor of the dropdown.
dropdownWidthstringWidth of the dropdown.
dropdownHeightstringHeight of the dropdown.
dropdownColorstringColor of the text.
dropdownFontweightstringWeight of the text
dropdownFontsizestringSize of the text
dropdownBorderradiusstringBorder radius of the dropdown
modalBackgroundColorstringBackground color of the list item
modalMaxheightstringMaximum height of the dropdown when it is open
tabWordsListarrayArray of list items

Development

  • Development server npm start.
  • Continuously run tests on file changes npm run watch-test;
  • Run tests: npm test;
  • Build npm run build;
0.2.1

1 year ago

0.2.0

1 year ago

0.1.8

1 year ago

0.1.9

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago