{/* prettier-ignore */}
{/*
Copyright 2023 Comcast Cable Communications Management, LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

SPDX-License-Identifier: Apache-2.0
\*/}

import { Meta, Title, ArgTypes, Description } from '@storybook/blocks';
import * as ListItemStories from './ListItem.stories';
import * as ButtonStories from '../Button/Button.stories';

<Meta of={ListItemStories} />

<Title />

<Description of={ListItemStories} />

## Source

https://github.com/rdkcentral/Lightning-UI-Components/tree/develop/packages/%40lightningjs/ui-components/src/components/ListItem

## Usage

`ListItem` extends `Button`, and therefore utilizes much of the same functionality and
properties. It can display an `Icon` or `Checkbox` before the text, a title and/or description in the center of the content, and an `Icon` or `Checkbox` in the Suffix after the text.

```js
import { ListItem } from '@lightningjs/ui-components';

class Basic extends lng.Component {
  static _template() {
    return {
      ListItem: {
        type: ListItem,
        title: 'List Item',
        description: 'Description',
        prefix: [{ type: Icon, icon: pathToIcon }]
      }
    };
  }
}
```

## API

### Parent Component Properties

`ListItem` extends `Button` therefore shares the same properties

<ArgTypes of={ButtonStories} exclude={['mode']} />

### Properties

In addition the `Button` properties, `ListItem` has the following properties:

<ArgTypes
  of={ListItemStories.ListItem}
  exclude={['suffix', 'prefix', 'title', 'mode']}
/>

### Style Properties

| name                 | type   | description                                  |
| -------------------- | ------ | -------------------------------------------- |
| alpha                | number | transparency of prefix and suffix components |
| descriptionTextStyle | object | text style to apply to the description       |
| logoStyle            | object | custom styling for the logo element          |
| paddingX             | number | padding on left and right sides of text      |
| contentSpacing       | number | padding between title and prefix             |
| titleTextStyle       | object | text style to apply to the title             |
