{/* 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 LabelStories from './Label.stories';

<Meta of={LabelStories} />

<Title />

This component is used to convey the status of a program in Tile ex. "Live" or "On Now".

## Source

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

## Usage

Labels simply require a background color, a title, and a title color. The Label will automatically adjust based on the rendered width of its text.

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

class Example extends lng.Component {
  static _template() {
    return {
      Label: {
        type: Label,
        title: 'Label',
        style: {
          backgroundColor: '#f6a50a',
          titleColor: '#ffffff'
        }
      }
    };
  }
}
```

## API

### Properties

| name  | type   | required | default   | description              |
| ----- | ------ | -------- | --------- | ------------------------ |
| title | string | true     | undefined | text to display in label |

### Style Properties

| name            | type             | description                                      |
| --------------- | ---------------- | ------------------------------------------------ |
| backgroundColor | string           | color of the label's background                  |
| paddingX        | number           | padding between left and right of text and label |
| paddingY        | number           | padding between top and bottom of text and label |
| offsetY         | number           | Used to ensure text is positioned correctly      |
| radius          | number \| array  | size of the corner radius                        |
| textStyle       | string \| object | text style for label title                       |
