<!--
  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 { Canvas, Story } from '@storybook/addon-docs';
import CardTitle from './CardTitle.js';

# CardTitle

Component shows title and description within a card.

## Source

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

## Usage

`CardTitle` can display both a title and a description if a title and description are passed in.
`CardTitle` extends [Card](?path=/docs/components-card--card)

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

class Basic extends lng.Component {
  static _template() {
    return {
      Card: {
        type: CardTitle,
        title: 'CardTitle',
        description: 'Description for the Card Title',
        details: 'Details'
      }
    };
  }
}
```

<Canvas>
  <Story id="components-cardtitle--card-title" />
</Canvas>

## API

### Properties

| name        | type             | required | default   | description |
| ----------- | ---------------- | -------- | --------- | ----------- |
| description | string \| object | false    | undefined | description |
| details     | string \| object | false    | undefined | details     |

### Style Properties

| name                      | type             | description                        |
| ------------------------- | ---------------- | ---------------------------------- |
| descriptionTextProperties | string \| object | text style of the description text |
| detailsTextProperties     | string \| object | text style of the details text     |
