Skip to content

Commit 83fcaac

Browse files
committed
docs(sheet): Move tsdoc around for easier sharing
1 parent 8bb4d51 commit 83fcaac

File tree

1 file changed

+34
-31
lines changed

1 file changed

+34
-31
lines changed

packages/sheet/src/Sheet.tsx

Lines changed: 34 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,39 @@ type AllowedDialogProps = Omit<
1010
"role" | "type" | "modal" | "forceContainer"
1111
>;
1212

13+
/**
14+
* The location that the sheet should be located within the viewport.
15+
*/
1316
export type SheetPosition = "top" | "right" | "bottom" | "left";
17+
18+
/**
19+
* The size to use for sheets that have been positioned left or right. The
20+
* default supported values are:
21+
*
22+
* - none - the size is based on content, but is still limited to the viewport
23+
* width so that the horizontal scrolling will not occur within the page. No
24+
* limits added to sizing.
25+
* - touch - the `min-width` is set to be the entire viewport width minus a
26+
* touchable area and `max-width` is set to `20rem` and is normally
27+
* recommended for mobile devices.
28+
* - static - the width is set to a static `16rem` and generally used for
29+
* landscape tablets and desktops.
30+
* - media - automatically switches between "touch" and "static" based on css
31+
* media queries. (this is the default)
32+
*/
1433
export type SheetHorizontalSize = "none" | "media" | "touch" | "static";
34+
35+
/**
36+
* The size to use for sheets that have been positioned top or bottom. The
37+
* supported sizes are:
38+
*
39+
* - none - the size is based on content and is limited to the viewport
40+
* height.
41+
* - touch - the size is based on content and is limited to the viewport
42+
* height with a touchable area to close the sheet.
43+
* - recommended - the material design recommended sizing that forces a
44+
* max-height of 50vh and min-height of 3.5rem
45+
*/
1546
export type SheetVerticalSize = "none" | "touch" | "recommended";
1647

1748
export interface BaseSheetProps extends AllowedDialogProps {
@@ -25,39 +56,11 @@ export interface BaseSheetProps extends AllowedDialogProps {
2556
*/
2657
role?: "dialog" | "menu" | "none";
2758

28-
/**
29-
* The location that the sheet should be located within the viewport.
30-
*/
59+
/** {@inheritDoc SheetPosition} */
3160
position?: SheetPosition;
32-
33-
/**
34-
* The size to use for sheets that have been positioned left or right. The
35-
* default supported values are:
36-
*
37-
* - none - the size is based on content, but is still limited to the viewport
38-
* width so that the horizontal scrolling will not occur within the page. No
39-
* limits added to sizing.
40-
* - touch - the `min-width` is set to be the entire viewport width minus a
41-
* touchable area and `max-width` is set to `20rem` and is normally
42-
* recommended for mobile devices.
43-
* - static - the width is set to a static `16rem` and generally used for
44-
* landscape tablets and desktops.
45-
* - media - automatically switches between "touch" and "static" based on css
46-
* media queries. (this is the default)
47-
*/
61+
/** {@inheritDoc SheetHorizontalSize} */
4862
horizontalSize?: SheetHorizontalSize;
49-
50-
/**
51-
* The size to use for sheets that have been positioned top or bottom. The
52-
* supported sizes are:
53-
*
54-
* - none - the size is based on content and is limited to the viewport
55-
* height.
56-
* - touch - the size is based on content and is limited to the viewport
57-
* height with a touchable area to close the sheet.
58-
* - recommended - the material design recommended sizing that forces a
59-
* max-height of 50vh and min-height of 3.5rem
60-
*/
63+
/** {@inheritDoc SheetVerticalSize} */
6164
verticalSize?: SheetVerticalSize;
6265
}
6366

0 commit comments

Comments
 (0)