MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / ListGroupItem

Function ListGroupItem

src/ListGroupItem.js:27–55  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

25};
26
27function ListGroupItem(props) {
28 const {
29 className,
30 cssModule,
31 tag: Tag = 'li',
32 active,
33 disabled,
34 action,
35 color,
36 ...attributes
37 } = props;
38 const classes = mapToCssModules(
39 classNames(
40 className,
41 active ? 'active' : false,
42 disabled ? 'disabled' : false,
43 action ? 'list-group-item-action' : false,
44 color ? `list-group-item-${color}` : false,
45 'list-group-item',
46 ),
47 cssModule,
48 );
49
50 // Prevent click event when disabled.
51 if (disabled) {
52 attributes.onClick = handleDisabledOnClick;
53 }
54 return <Tag {...attributes} className={classes} />;
55}
56
57ListGroupItem.propTypes = propTypes;
58

Callers

nothing calls this directly

Calls 1

mapToCssModulesFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…