@cloud-ru/ds-bottom-sheet 2.2.0 → 2.2.1-preview-2f5fa273.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/cjs/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/cjs/components/BottomSheet/BottomSheet.js +2 -2
- package/dist/cjs/types.d.ts +4 -0
- package/dist/esm/components/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/esm/components/BottomSheet/BottomSheet.js +2 -2
- package/dist/esm/types.d.ts +4 -0
- package/dist/tsconfig.cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/BottomSheet/BottomSheet.tsx +4 -2
- package/src/types.ts +4 -0
|
@@ -28,6 +28,8 @@ export function BottomSheet({
|
|
|
28
28
|
footer,
|
|
29
29
|
footerTestIds,
|
|
30
30
|
withDividers = true,
|
|
31
|
+
withHeaderDivider = withDividers,
|
|
32
|
+
withFooterDivider = withDividers,
|
|
31
33
|
swipeEnabled = true,
|
|
32
34
|
// safeAreaTop/safeAreaBottom уходят в `...rest` → BottomSheetCustom (env-паддинг на `.content`).
|
|
33
35
|
className,
|
|
@@ -96,13 +98,13 @@ export function BottomSheet({
|
|
|
96
98
|
/>
|
|
97
99
|
)}
|
|
98
100
|
|
|
99
|
-
{
|
|
101
|
+
{withHeaderDivider && hasHeader && (
|
|
100
102
|
<div className={styles.divider} data-test-id={TEST_IDS.dividerTop} aria-hidden />
|
|
101
103
|
)}
|
|
102
104
|
|
|
103
105
|
<BottomSheetCustom.Body bodyPadding={bodyPadding}>{content}</BottomSheetCustom.Body>
|
|
104
106
|
|
|
105
|
-
{
|
|
107
|
+
{withFooterDivider && hasFooter && (
|
|
106
108
|
<div className={styles.divider} data-test-id={TEST_IDS.dividerBottom} aria-hidden />
|
|
107
109
|
)}
|
|
108
110
|
|
package/src/types.ts
CHANGED
|
@@ -159,6 +159,10 @@ export type BottomSheetProps = Omit<BottomSheetCustomProps, 'children' | 'disabl
|
|
|
159
159
|
* @default true
|
|
160
160
|
*/
|
|
161
161
|
withDividers?: boolean;
|
|
162
|
+
/** Разделитель под шапкой. По умолчанию используется `withDividers`. */
|
|
163
|
+
withHeaderDivider?: boolean;
|
|
164
|
+
/** Разделитель над футером. По умолчанию используется `withDividers`. */
|
|
165
|
+
withFooterDivider?: boolean;
|
|
162
166
|
/**
|
|
163
167
|
* Основная кнопка действия — объект пропсов `Button` (по умолчанию `view='filled'`,
|
|
164
168
|
* `appearance='primary'`). Ширина зависит от `footerActionsOrientation` и числа кнопок.
|