MCPcopy
hub / github.com/obytes/react-native-template-obytes / getDetachedProps

Function getDetachedProps

src/components/ui/modal.tsx:134–143  ·  view source on GitHub ↗

* * @param detached * @returns * * @description * In case the modal is detached, we need to add some extra props to the modal to make it look like a detached modal.

(detached: boolean)

Source from the content-addressed store, hash-verified

132 */
133
134function getDetachedProps(detached: boolean) {
135 if (detached) {
136 return {
137 detached: true,
138 bottomInset: 46,
139 style: { marginHorizontal: 16, overflow: 'hidden' },
140 } as Partial<BottomSheetModalProps>;
141 }
142 return {} as Partial<BottomSheetModalProps>;
143}
144
145/**
146 * ModalHeader

Callers 1

ModalFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected