repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 2.39 kB
JSON
{"ast":null,"code":"export const handlePress = ({\n onPress,\n value,\n onValueChange,\n event\n}) => {\n if (onPress && onValueChange) {\n console.warn(`onPress in the scope of RadioButtonGroup will not be executed, use onValueChange instead`);\n }\n onValueChange ? onValueChange(value) : onPress === null || onPress === void 0 ? void 0 : onPress(event);\n};\nexport const isChecked = ({\n value,\n status,\n contextValue\n}) => {\n if (contextValue !== undefined && contextValue !== null) {\n return contextValue === value ? 'checked' : 'unchecked';\n } else {\n return status;\n }\n};","map":{"version":3,"names":["handlePress","onPress","value","onValueChange","event","console","warn","isChecked","status","contextValue","undefined"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/RadioButton/utils.ts"],"sourcesContent":["import type { GestureResponderEvent } from 'react-native';\n\nexport const handlePress = ({\n onPress,\n value,\n onValueChange,\n event,\n}: {\n onPress?: (e: GestureResponderEvent) => void;\n value: string;\n onValueChange?: (value: string) => void;\n event: GestureResponderEvent;\n}) => {\n if (onPress && onValueChange) {\n console.warn(\n `onPress in the scope of RadioButtonGroup will not be executed, use onValueChange instead`\n );\n }\n\n onValueChange ? onValueChange(value) : onPress?.(event);\n};\n\nexport const isChecked = ({\n value,\n status,\n contextValue,\n}: {\n value: string;\n status?: 'checked' | 'unchecked';\n contextValue?: string;\n}) => {\n if (contextValue !== undefined && contextValue !== null) {\n return contextValue === value ? 'checked' : 'unchecked';\n } else {\n return status;\n }\n};\n"],"mappings":"AAEA,OAAO,MAAMA,WAAW,GAAGA,CAAC;EAC1BC,OAAO;EACPC,KAAK;EACLC,aAAa;EACbC;AAMF,CAAC,KAAK;EACJ,IAAIH,OAAO,IAAIE,aAAa,EAAE;IAC5BE,OAAO,CAACC,IAAI,CACV,0FACF,CAAC;EACH;EAEAH,aAAa,GAAGA,aAAa,CAACD,KAAK,CAAC,GAAGD,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAGG,KAAK,CAAC;AACzD,CAAC;AAED,OAAO,MAAMG,SAAS,GAAGA,CAAC;EACxBL,KAAK;EACLM,MAAM;EACNC;AAKF,CAAC,KAAK;EACJ,IAAIA,YAAY,KAAKC,SAAS,IAAID,YAAY,KAAK,IAAI,EAAE;IACvD,OAAOA,YAAY,KAAKP,KAAK,GAAG,SAAS,GAAG,WAAW;EACzD,CAAC,MAAM;IACL,OAAOM,MAAM;EACf;AACF,CAAC","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}