ListItemCustom

Install

yarn add @ntds/list

Import

import { ListItemCustom } from '@ntds/list';

Props

ListItemCustom

PropType & Description
onClick
() => void

Called when the item is clicked

itemRight
ReactNode

Content to display on the right side of the list item.

itemLeft
ReactNode

Main content to display on the left side of the list item.

twItemLeft
string

Tailwind overrides for the left item Example: twItemLeft={{ text: 'text-red-500', color: 'bg-blue-100' }}

twItemRight
string

Tailwind overrides for the right item Example: twItemRight={{ text: 'text-green-500', color: 'bg-yellow-100' }}

render
(props: Omit<BaseButtonProps, "render" | "type" | "hoverAffordance" | "elementRef" | "tw">) => Element

Hook into the top render method of the wrapping element With internal link: render={props => <a href='/' {...props} />} With external link: render={props => <a rel='noreferrer' target='_blank' href='/' {...props} />}

This guide is based on version: 2.1.7