Skip to content

Commit 4f4562d

Browse files
mrp-78majidsajadi
authored andcommitted
feat(pinwheel): add jsdoc
1 parent 1edd00b commit 4f4562d

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

src/pinwheel/index.ts

+30
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,36 @@ import { customElement } from "lit/decorators.js";
22
import { Pinwheel } from "./pinwheel";
33
import styles from "./pinwheel.style";
44

5+
/**
6+
* ### Example
7+
*
8+
* ```html
9+
* <tap-pinwheel .items=${["item1", "item2"]}></tap-avatar>
10+
* ```
11+
*
12+
* @summary A pinwheel component for selecting items by scrolling through a list.
13+
*
14+
* @prop {Array.<string>} items - An array of strings that contains pinwheel items.
15+
*
16+
* @csspart pinwheel - The container that wraps the pinwheel component.
17+
* @csspart pinwheel-item - The item that rendered in pinwheel.
18+
*
19+
* @cssprop [--tap-pinwheel-spacing-0=--tap-sys-spacing-0]
20+
* @cssprop [--tap-pinwheel-spacing-6=--tap-sys-spacing-6]
21+
* @cssprop [--tap-pinwheel-spacing-11=--tap-sys-spacing-11]
22+
*
23+
* @cssprop [--tap-font-family=--tap-sys-font-family]
24+
* @cssprop [--tap-pinwheel-typography-body-md-height=--tap-sys-typography-body-md-height]
25+
* @cssprop [--tap-pinwheel-typography-body-md-size=--tap-sys-typography-body-md-size]
26+
* @cssprop [--tap-pinwheel-typography-body-md-weight=--tap-sys-typography-body-md-weight]
27+
* @cssprop [--tap-pinwheel-color-content-tertiary=--tap-sys-color-content-tertiary]
28+
*
29+
* @cssprop [--tap-pinwheel-typography-label-md-height=--tap-sys-typography-label-md-height]
30+
* @cssprop [--tap-pinwheel-typography-label-md-size=--tap-sys-typography-label-md-size]
31+
* @cssprop [--tap-pinwheel-typography-label-md-weight=--tap-sys-typography-label-md-weight]
32+
* @cssprop [--tap-pinwheel-color-content-primary=--tap-sys-color-content-primary]
33+
*
34+
*/
535
@customElement("tap-pinwheel")
636
export class TapPinwheel extends Pinwheel {
737
static readonly styles = [styles];

src/pinwheel/pinwheel.style.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export default css`
1717
}
1818
1919
.pinwheel > div {
20-
padding: var(--tap-sys-spacing-0) var(--tap-sys-spacing-6);
20+
padding: var(--tap-pinwheel-spacing-0, var(--tap-sys-spacing-0)) var(--tap-pinwheel-spacing-6, var(--tap-sys-spacing-6));
2121
/* FIXME: we dont have sizing tokens yet */
2222
height: 48px;
2323
font: inherit;

0 commit comments

Comments
 (0)