{/* 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 } from '@storybook/blocks';
import * as CardSectionStories from './CardSection.stories';

<Meta of={CardSectionStories} />

<Title />

Component shows title and icon to the right of the title.

## Source

https://github.com/rdkcentral/Lightning-UI-Components/blob/develop/packages/%40lightningjs/ui-components/src/components/Card/CardSection.js

## Usage

`CardSection` can display a title and an icon. If an icon is being passed in, iconWidth and iconHeight will also have to be passed in for the icon to render. Additionally, a title can be passed in.
`CardSection` extends [Card](?path=/docs/components-card--docs)

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

class Basic extends lng.Component {
  static _template() {
    return {
      CardSection: {
        type: CardSection,
        title: 'Card Section'
      }
    };
  }
}
```

## API

### Properties

| name       | type   | required | default   | description                     |
| ---------- | ------ | -------- | --------- | ------------------------------- |
| iconHeight | number | false    | undefined | height of the icon on the right |
| iconSrc    | string | false    | undefined | icon source                     |
| iconWidth  | number | false    | undefined | width of the icon on the right  |

### Style Properties

| name           | type             | description             |
| -------------- | ---------------- | ----------------------- |
| iconHeight     | number           | stylized height of icon |
| iconWidth      | number           | stylized width of icon  |
| titleTextStyle | string \| object | style of Title text     |
