Skip to content

Commit

Permalink
fix(core): add missing metadata for panel inputs
Browse files Browse the repository at this point in the history
Signed-off-by: Cory Rylan <splintercode.cb@gmail.com>
  • Loading branch information
coryrylan committed Jan 6, 2022
1 parent 5c0c5cb commit 0695d3b
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 30 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
* Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
Expand All @@ -11,27 +11,24 @@ import { property } from '@cds/core/internal';
import { SelectionPanelSizes } from '../shared/selection-panel.interfaces.js';

/**
* Checkbox
* Checkbox Panel
*
* ```typescript
* import '@cds/core/checkbox/register.js';
* import '@cds/core/selection-panels/checkbox/register.js';
* ```
*
* ```html
* <cds-checkbox>
* <label>
* <div cds-layout="vertical align:center">
* <span cds-text="section">VM One</span>
* <cds-icon shape="vm" badge="info"></cds-icon>
* <p>Machines for orchestration and automation.</p>
* </div>
* <cds-checkbox-panel>
* <label cds-layout="vertical gap:md align:center">
* <span cds-text="section">VM One</span>
* <span cds-text="subsection center">Orchestrate & Automate</p>
* </label>
* <input type="checkbox" />
* <cds-control-message>message text</cds-control-message>
* </cds-checkbox>
* <input type="radio" value="0" />
* </cds-checkbox-panel>
* ```
*
* @element cds-checkbox
* @beta
* @element cds-checkbox-panel
* @slot - For projecting checkbox and it's complex label
* @cssprop --width
* @cssprop --height
Expand Down
37 changes: 21 additions & 16 deletions packages/core/src/selection-panels/radio/radio-panel.element.ts
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2016-2021 VMware, Inc. All Rights Reserved.
* Copyright (c) 2016-2022 VMware, Inc. All Rights Reserved.
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
Expand All @@ -11,28 +11,33 @@ import { property } from '@cds/core/internal';
import { SelectionPanelSizes } from '../shared/selection-panel.interfaces.js';

/**
* Checkbox
* Radio Panel
*
* ```typescript
* import '@cds/core/checkbox/register.js';
* import '@cds/core/selection-panels/radio/register.js';
* ```
*
* ```html
* <cds-radio>
* <label>
* <div cds-layout="vertical align:center">
* <cds-radio-group>
* <cds-radio-panel>
* <label cds-layout="vertical gap:md align:center">
* <span cds-text="section">VM One</span>
* <cds-icon shape="vm" badge="info"></cds-icon>
* <p>Machines for orchestration and automation.</p>
* </div>
* </label>
* <input type="radio" />
* <cds-control-message>message text</cds-control-message>
* </cds-radio>
* <span cds-text="subsection center">Orchestrate & Automate</p>
* </label>
* <input type="radio" value="0" />
* </cds-radio-panel>
* <cds-radio-panel>
* <label cds-layout="vertical gap:md align:center">
* <span cds-text="section">VM One</span>
* <span cds-text="subsection center">Orchestrate & Automate</p>
* </label>
* <input type="radio" value="1" />
* </cds-radio-panel>
* </cds-radio-group>
* ```
*
* @element cds-radio
* @slot - For projecting checkbox and it's complex label
* @beta
* @element cds-radio-panel
* @slot - For projecting radio and it's complex label
* @cssprop --width
* @cssprop --height
* @cssprop --border
Expand Down

0 comments on commit 0695d3b

Please sign in to comment.