UNPKG

rn-inkpad

Version:

<img src="https://res.cloudinary.com/fercloudinary/image/upload/v1715452841/packages/inkpad-banner_acl0xl.png" />

22 lines (21 loc) 656 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.useActionSheet = void 0; const useActionSheetTheme_1 = require("./useActionSheetTheme"); const useActionSheet = (actionLength, theme) => { const { styles } = (0, useActionSheetTheme_1.useActionSheetTheme)(theme); const getBorder = (idx) => { if (actionLength === 1) { return 'all'; } if (idx === 0) { return 'top'; } if (idx + 1 === actionLength) { return 'bottom'; } return 'none'; }; return { getBorder, ...styles }; }; exports.useActionSheet = useActionSheet;