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

<Meta of={ProgressBarStories} />

<Title />

Component that shows current progress in a range

## Source

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

## Usage

`ProgressBar` can display `progress` as a perctange of the total `w`:

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

class Example extends lng.Component {
  static _template() {
    return {
      ProgressBar: {
        type: ProgressBar,
        w: 410,
        progress: 0.5
      }
    };
  }
}
```

The default progress bar width is 410.

## API

### Properties

| name     | type   | required | default | description                                                    |
| -------- | ------ | -------- | ------- | -------------------------------------------------------------- |
| progress | number | false    | 0       | Percentage of current progress in a decimal format from 0 to 1 |

### Style Properties

| name          | type           | description                                                      |
| ------------- | -------------- | ---------------------------------------------------------------- |
| animation     | object         | sets the properties to use on the animation of a progress change |
| barColor      | number\|string | color of the background "bar" color                              |
| progressColor | number\|string | color of the foreground "progress"                               |
| radius        | number\|array  | radius to apply to the bar and progress corners                  |
