1.0.10 • Published 15 days ago

@synerise/ds-list-item v1.0.10

Weekly downloads
-
License
ISC
Repository
github
Last release
15 days ago

id: list-item

title: ListItem

ListItem UI Component

Installation

npm i @synerise/ds-list-item
or
yarn add @synerise/ds-list-item

Usage

import ListItem from '@synerise/ds-list-item'

<ListItem />

Demo

API

PropertyDescriptionTypeDefault
classNameExtra stylesstring-
childrenListItem contentReact.ReactNode-
checkedfor type="select" it renders a check icon as suffix, for other types only an additional classnameboolean-
copyableAllow copying value by clickingboolean-
copyHintContent that disaplys on hover if copyableReactNode-
copyValueValue that gets copied to clipboardstring-
copyTooltipContent displayed in tooltip after copyingReactNode-
description2nd line of content in itemReactNode-
disabledrenders disabled / unclickable itemboolean-
higherApplies to type "divider" onlyboolean-
highlightstring to highlight in itemsstring-
hoverTooltipPropsProps for hover tooltip. see rc-trigger for detailsTriggerProps & { ref?: React.LegacyRef<TriggerHandle> }-
keyunique keystring / number-
levelApplies to type "divider" onlynumber-
onItemHoverhoverHandler(item: ItemData<MouseEvent<HTMLDivElement>>) => void-
onClickonClick handler(item: ItemData<MouseEvent<HTMLDivElement>>) => void-
orderedrenders ordinal numbers in itemsboolean-
parentif true will display an arrow icon next to labelboolean-
prefixelprefix elementReactNode | AddonRenderer-
prefixVisibilityTriggerdrives prefix visibility'hover' | 'default'-
renderHoverTooltipTooltip to display on item hover() => JSX.Element-
sizeheight of the item'default' | 'large''default'
suffixelsuffix element. Item with type="select" and checked also displays a check iconReactNode | AddonRenderer-
suffixVisibilityTriggerdrives suffix visibility'hover' | 'default'-
textprop alternative to childrenReactNode-
timeToHideTooltipcopy tooltip delaynumber-
titletitle attribute (a11y prop)string-
tooltipPropsTooltip props for "copied" tooltip. See @synerise/ds-tooltipTooltipProps-
typeType of the list item"default" | "danger" | "divider" | "select"-

AddonRenderer

    type AddonRenderer = (hovered: boolean) => ReactNode;

ItemData

prop passed to onClick and onItemHover handlers

PropertyDescriptionType
keyitem keystring
itemclicked / hovered item dataPartial
domEventEvent triggeredMouseEvent<HTMLDivElement>
1.0.2

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago

1.0.9

26 days ago

1.0.8

1 month ago

1.0.7

1 month ago

1.0.6

2 months ago

1.0.5

2 months ago

1.0.4

3 months ago

1.0.3

3 months ago

1.0.10

15 days ago

0.7.7

3 months ago

0.7.6

4 months ago

0.7.5

4 months ago

0.7.4

4 months ago

0.7.3

4 months ago

0.7.2

4 months ago

0.7.1

4 months ago

0.7.0

5 months ago

0.6.3

5 months ago

0.6.2

5 months ago

0.5.0

7 months ago

0.5.1

7 months ago

0.4.19

7 months ago

0.4.17

7 months ago

0.4.18

7 months ago

0.6.1

6 months ago

0.6.0

7 months ago

0.4.15

8 months ago

0.4.16

8 months ago

0.4.14

8 months ago

0.4.13

9 months ago

0.4.12

9 months ago

0.4.9

9 months ago

0.4.8

10 months ago

0.0.25

1 year ago

0.4.10

9 months ago

0.4.11

9 months ago

0.1.0

1 year ago

0.3.0

12 months ago

0.2.0

12 months ago

0.1.1

12 months ago

0.4.5

10 months ago

0.4.4

11 months ago

0.4.7

10 months ago

0.4.6

10 months ago

0.4.1

11 months ago

0.4.0

12 months ago

0.4.3

11 months ago

0.4.2

11 months ago

0.0.24

1 year ago

0.0.23

1 year ago

0.0.21

1 year ago

0.0.22

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.10

1 year ago

0.0.11

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago