add-item

v1.0.1arrow_drop_down
v1.0.1
v1.0.0
STATUS
Passing
DOWNLOADS
260
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
5 years ago
SIZE
44 KB
AddItem is two buttons and textarea to write a new item, one button to add item and another one to remove all items.
1 contributor
Install add-item as a package?
Copied
npm i @bit/joshk.basic-todo-app.add-item
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
chevron_left
chevron_right
AddItem ()

AddItem is two buttons and textarea to write a new item, one button to add item and another one to remove all items.

Example
<AddItem
handleAddItem={(data) => console.log(`new item text is ${data.text}`)}
handleRemoveAllItems={() => console.log(`click on remove all items`)}
/>
Properties
NameTypeDefault valueDescription
handleAddItem
functionnull

handleAddItem is a function that can be called to get the text of a new item.

handleRemoveAllItems
functionnull

handleRemoveAllItems is a function that can be called to remove all items.

showRemoveAllButton
booltrue

showRemoveAllButton determine if remove all items button will be display.

Help and resources