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

<Meta of={GridOverlayStories} />

<Title />

This component shows the grid layout, including the column spans and guides for margins and gutters.

## Source

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

## Usage

`GridOverlay` just has toggles for showing the columns, margins, gutters, and textbox, which are all visible by default.

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

class Basic extends lng.Component {
  static _template() {
    return {
      GridOverlay: {
        type: GridOverlay
      }
    };
  }
}
```

## API

### Properties

| name        | type    | required | default | description                                                                                                                                       |
| ----------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| showColumns | boolean | false    | true    | when true, displays the column span rectangles                                                                                                    |
| showGutters | boolean | false    | true    | when true, displays the rulers for spacing between columns                                                                                        |
| showMargins | boolean | false    | true    | when true, displays the X and Y margin rulers                                                                                                     |
| showSafe    | boolean | false    | true    | when true, displays the X and Y "safe" zone rulers (this is the area that content should not be rendered in to avoid screen clipping on a device) |
| showText    | boolean | false    | true    | when true, displays the textbox containing the exact numbers associated with the screen, margin, safe, and gutter sizes                           |

### Style Properties

| name              | type             | description                              |
| ----------------- | ---------------- | ---------------------------------------- |
| propertyTextStyle | string \| object | text style to apply to the property text |
| valueTextStyle    | string \| object | text style to apply to the value text    |
