<!--
  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 CardRadio from '.';

# CardRadio

This component is a variant of the `Card` component that includes multiple lines of text and radio functionality.

## Source

https://github.com/rdkcentral/Lightning-UI-Components/packages/@lightningjs/ui-components/src/components/CardRadio/CardRadio.js

## Usage

`CardRadio` can display a title, subtitle, description and details
`CardRadio` extends [CardTitle](?path=/docs/tiles-cards-cardtitle--card-title)

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

class Basic extends lng.Component {
  static _template() {
    return {
      CardRadio: {
        type: CardRadio,
        title: 'Title',
        subtitile: 'subtitle',
        description: 'description',
        details: 'details'
      }
    };
  }
}
```

<Canvas>
  <Story id="tiles-cards-cardradio--card-radio" />
</Canvas>

## API

### Properties

| name     | type   | required | default   | description                                                                                             |
| -------- | ------ | -------- | --------- | ------------------------------------------------------------------------------------------------------- |
| radio    | object | false    | undefined | Object containing all properties supported in the [Radio component](?path=/docs/utilities-radio--radio) |
| subtitle | string | false    | undefined | The text to be displayed in the subtitle section of the card.                                           |

### Style Properties

| name                 | type             | description                             |
| -------------------- | ---------------- | --------------------------------------- |
| descriptionTextStyle | string \| object | styles applied to the description text. |
| subtitleTextStyle    | string \| object | styles applied to the subtitle text.    |
