-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #111 from amir78729/docs/jsdoc/row
docs: add JSDoc to `row` component
- Loading branch information
Showing
4 changed files
with
165 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,61 @@ | ||
import { customElement } from "lit/decorators.js"; | ||
import { Row } from "./row"; | ||
import styles from "./row.style"; | ||
import { customElement } from 'lit/decorators.js'; | ||
import { Row } from './row'; | ||
import styles from './row.style'; | ||
|
||
@customElement("tap-row") | ||
/** | ||
* ### Example | ||
* | ||
* | ||
* ##### Simple | ||
* | ||
* ```html | ||
* <tap-row> | ||
* <div slot="leading">Leading content</div> | ||
* <div slot="content">Main content</div> | ||
* <div slot="trailing">Trailing content</div> | ||
* </tap-row> | ||
* ``` | ||
* | ||
* ##### Navigable Row | ||
* | ||
* ```html | ||
* <tap-row navigable> | ||
* <div slot="leading">Leading content</div> | ||
* <div slot="content">Main content</div> | ||
* <div slot="trailing">Trailing content</div> | ||
* </tap-row> | ||
* ``` | ||
* | ||
* @summary A flexible row component with leading, content, and trailing slots. | ||
* | ||
* @prop {`'standard'` \| `'compact'`} [`size`=`'compact'`] - The size of the row. Defaults to `standard`. | ||
* @prop {`boolean`} [`navigable`=`false`] - Indicates whether the row is navigable (clickable). | ||
* | ||
* @csspart [`row`] - The main container for the row. | ||
* @csspart [`leading`] - The container for the leading slot. | ||
* @csspart [`content`] - The container for the content slot. | ||
* @csspart [`trailing`] - The container for the trailing slot. | ||
* @csspart [`navigable`] - The container for the navigable icon. | ||
* | ||
* @cssprop [`--tap-font-family`=`--tap-sys-font-family`] - The font family used in the row. | ||
* @cssprop [`--tap-row-background-color`=`--tap-palette-white`] - The background color of the row. | ||
* @cssprop [`--tap-row-leading-vertical-padding`] - The vertical padding for the leading slot. | ||
* @cssprop [`--tap-row-leading-horizontal-padding`=`--tap-sys-spacing-4`] - The horizontal padding for the leading slot. | ||
* @cssprop [`--tap-row-content-padding`=`--tap-sys-spacing-4`] - The padding for the content slot. | ||
* @cssprop [`--tap-row-trailing-vertical-padding`] - The vertical padding for the trailing slot. | ||
* @cssprop [`--tap-row-trailing-horizontal-padding`=`--tap-sys-spacing-4`] - The horizontal padding for the trailing slot. | ||
* @cssprop [`--tap-row-standard-height`=`--tap-sys-spacing-13`] - The height of the standard size row. | ||
* @cssprop [`--tap-row-compact-height`=`--tap-sys-spacing-12`] - The height of the compact size row. | ||
* | ||
* @event slotchange - Dispatched when the content of any slot changes. | ||
*/ | ||
@customElement('tap-row') | ||
export class TapRow extends Row { | ||
static readonly styles = [styles]; | ||
} | ||
|
||
declare global { | ||
interface HTMLElementTagNameMap { | ||
"tap-row": TapRow; | ||
'tap-row': TapRow; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters