Skip to content

Commit

Permalink
Add active prop to ListGroupItem
Browse files Browse the repository at this point in the history
  • Loading branch information
markusjwetzel committed Apr 23, 2021
1 parent aa88a6e commit 2a81120
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/components/list-group/ListGroupItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,24 @@ import BaseView from '../../utils/rnw-compat/BaseView';
const propTypes = {
children: PropTypes.node.isRequired,
color: PropTypes.oneOf(COLORS),
active: PropTypes.bool,
disabled: PropTypes.bool,
};

const ListGroupItem = React.forwardRef((props, ref) => {
const { color = null, disabled = false, ...elementProps } = props;
const {
color = null,
active = false,
disabled = false,
...elementProps
} = props;

const classes = cx(
// constant classes
'list-group-item',
// variable classes
color && `list-group-item-${color}`,
active && 'active',
disabled && 'disabled',
);

Expand Down

0 comments on commit 2a81120

Please sign in to comment.