Skip to content

Commit

Permalink
docs: consistent api refs for tree and tree-item (#4488)
Browse files Browse the repository at this point in the history
* docs(tree): consistent api refs

* docs(tree-item): consistent api refs

* docs(tree): consistent declarations
  • Loading branch information
geospatialem authored May 5, 2022
1 parent 8d72bba commit eabe5f7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
22 changes: 11 additions & 11 deletions src/components/tree-item/tree-item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import {

/**
* @slot - A slot for adding content to the item.
* @slot children - A slot for adding nested `calcite-tree` elements.
* @slot children - A slot for adding nested calcite-tree elements.
*/
@Component({
tag: "calcite-tree-item",
Expand All @@ -47,46 +47,46 @@ export class TreeItem implements ConditionalSlotComponent {
//
//--------------------------------------------------------------------------

/** Is the item currently selected */
/** Selected state of the item. */
@Prop({ mutable: true, reflect: true }) selected = false;

/** True if the item is in an expanded state */
/** Expanded state of the item. */
@Prop({ mutable: true, reflect: true }) expanded = false;

@Watch("expanded")
expandedHandler(newValue: boolean): void {
this.updateParentIsExpanded(this.el, newValue);
}

/** @internal Is the parent of this item expanded? */
/** @internal Expanded state of the parent. */
@Prop() parentExpanded = false;

/** @internal What level of depth is this item at? */
/** @internal Level of depth of the item. */
@Prop({ reflect: true, mutable: true }) depth = -1;

/** @internal Does this tree item have a tree inside it? */
@Prop({ reflect: true, mutable: true }) hasChildren: boolean = null;

/** @internal Draw lines (set on parent) */
/** @internal Draws lines (set on parent). */
@Prop({ reflect: true, mutable: true }) lines: boolean;

/** Display checkboxes (set on parent)
/** Displays checkboxes (set on parent).
* @internal
* @deprecated set "ancestors" selection-mode on parent tree for checkboxes
* @deprecated Use "ancestors" selection-mode on parent for checkbox input.
*/
@Prop() inputEnabled: boolean;

/** @internal Scale of the parent tree, defaults to m */
/** @internal Scale of the parent tree. */
@Prop({ reflect: true, mutable: true }) scale: Scale;

/**
* @internal
* In ancestor selection mode,
* show as indeterminate when only some children are selected
* show as indeterminate when only some children are selected.
**/
@Prop({ reflect: true }) indeterminate: boolean;

/** @internal Tree selection-mode (set on parent) */
/** @internal Tree selection-mode (set on parent). */
@Prop({ mutable: true }) selectionMode: TreeSelectionMode;

@Watch("selectionMode")
Expand Down
14 changes: 7 additions & 7 deletions src/components/tree/tree.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TreeSelectDetail, TreeSelectionMode } from "./interfaces";
import { Scale } from "../interfaces";

/**
* @slot - A slot for `calcite-tree-item` elements.
* @slot - A slot for calcite-tree-item elements.
*/
@Component({
tag: "calcite-tree",
Expand All @@ -37,21 +37,21 @@ export class Tree {
//
//--------------------------------------------------------------------------

/** Display indentation guide lines */
/** Display indentation guide lines. */
@Prop({ mutable: true, reflect: true }) lines = false;

/** Display input
* @deprecated use "ancestors" selection-mode for checkbox input
* @deprecated Use "ancestors" selection-mode for checkbox input.
*/
@Prop() inputEnabled = false;

/** @internal If this tree is nested within another tree, set to false */
/** @internal If this tree is nested within another tree, set to false. */
@Prop({ reflect: true, mutable: true }) child: boolean;

/** Specify the scale of the tree, defaults to m */
/** Specify the scale of the tree. */
@Prop({ mutable: true, reflect: true }) scale: Scale = "m";

/** Customize how tree selection works (single, multi, children, multi-children, ancestors)
/** Customize how tree selection works.
* @default "single"
* @see [TreeSelectionMode](https://github.com/Esri/calcite-components/blob/master/src/components/tree/interfaces.ts#L5)
*/
Expand Down Expand Up @@ -338,7 +338,7 @@ export class Tree {
//--------------------------------------------------------------------------

/**
* Emitted when user selects/deselects tree items. An object including an array of selected items will be passed in the event's `detail` property.
* Emits when the user selects/deselects tree items. An object including an array of selected items will be passed in the event's "detail" property.
* @see [TreeSelectDetail](https://github.com/Esri/calcite-components/blob/master/src/components/tree/interfaces.ts#L1)
*/
@Event() calciteTreeSelect: EventEmitter<TreeSelectDetail>;
Expand Down

0 comments on commit eabe5f7

Please sign in to comment.