repoweaver
Version:
A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies
1 lines • 4.43 kB
JSON
{"ast":null,"code":"import * as React from 'react';\nimport StyleSheet from \"react-native-web/dist/exports/StyleSheet\";\nimport View from \"react-native-web/dist/exports/View\";\nimport { useInternalTheme } from \"../../core/theming\";\nimport Icon from \"../Icon\";\nconst DialogIcon = ({\n size = 24,\n color,\n icon,\n theme: themeOverrides\n}) => {\n const theme = useInternalTheme(themeOverrides);\n if (!theme.isV3) {\n return null;\n }\n const iconColor = color || theme.colors.secondary;\n return React.createElement(View, {\n style: styles.wrapper\n }, React.createElement(Icon, {\n source: icon,\n color: iconColor,\n size: size\n }));\n};\nDialogIcon.displayName = 'Dialog.Icon';\nconst styles = StyleSheet.create({\n wrapper: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingTop: 24\n }\n});\nexport default DialogIcon;\nexport { DialogIcon };","map":{"version":3,"names":["React","StyleSheet","View","useInternalTheme","Icon","DialogIcon","size","color","icon","theme","themeOverrides","isV3","iconColor","colors","secondary","createElement","style","styles","wrapper","source","displayName","create","alignItems","justifyContent","paddingTop"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/Dialog/DialogIcon.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleSheet, View } from 'react-native';\n\nimport type { ThemeProp } from 'src/types';\n\nimport { useInternalTheme } from '../../core/theming';\nimport Icon, { IconSource } from '../Icon';\n\nexport type Props = {\n /**\n * Custom color for action icon.\n */\n color?: string;\n /**\n * Name of the icon to show.\n */\n icon: IconSource;\n /**\n * Optional icon size.\n */\n size?: number;\n /**\n * @optional\n */\n theme?: ThemeProp;\n};\n\n/**\n * @supported Available in v5.x with theme version 3\n * A component to show an icon in a Dialog.\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { StyleSheet } from 'react-native';\n * import { Dialog, Portal, Text } from 'react-native-paper';\n *\n * const MyComponent = () => {\n * const [visible, setVisible] = React.useState(false);\n *\n * const hideDialog = () => setVisible(false);\n *\n * return (\n * <Portal>\n * <Dialog visible={visible} onDismiss={hideDialog}>\n * <Dialog.Icon icon=\"alert\" />\n * <Dialog.Title style={styles.title}>This is a title</Dialog.Title>\n * <Dialog.Content>\n * <Text variant=\"bodyMedium\">This is simple dialog</Text>\n * </Dialog.Content>\n * </Dialog>\n * </Portal>\n * );\n * };\n *\n * const styles = StyleSheet.create({\n * title: {\n * textAlign: 'center',\n * },\n * })\n *\n * export default MyComponent;\n * ```\n */\nconst DialogIcon = ({\n size = 24,\n color,\n icon,\n theme: themeOverrides,\n}: Props) => {\n const theme = useInternalTheme(themeOverrides);\n\n if (!theme.isV3) {\n return null;\n }\n\n //@ts-ignore\n const iconColor = color || theme.colors.secondary;\n\n return (\n <View style={styles.wrapper}>\n <Icon source={icon} color={iconColor} size={size} />\n </View>\n );\n};\n\nDialogIcon.displayName = 'Dialog.Icon';\n\nconst styles = StyleSheet.create({\n wrapper: {\n alignItems: 'center',\n justifyContent: 'center',\n paddingTop: 24,\n },\n});\n\nexport default DialogIcon;\n\n// @component-docs ignore-next-line\nexport { DialogIcon };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAA,OAAAC,UAAA;AAAA,OAAAC,IAAA;AAK9B,SAASC,gBAAgB;AACzB,OAAOC,IAAI;AA0DX,MAAMC,UAAU,GAAGA,CAAC;EAClBC,IAAI,GAAG,EAAE;EACTC,KAAK;EACLC,IAAI;EACJC,KAAK,EAAEC;AACF,CAAC,KAAK;EACX,MAAMD,KAAK,GAAGN,gBAAgB,CAACO,cAAc,CAAC;EAE9C,IAAI,CAACD,KAAK,CAACE,IAAI,EAAE;IACf,OAAO,IAAI;EACb;EAGA,MAAMC,SAAS,GAAGL,KAAK,IAAIE,KAAK,CAACI,MAAM,CAACC,SAAS;EAEjD,OACEd,KAAA,CAAAe,aAAA,CAACb,IAAI;IAACc,KAAK,EAAEC,MAAM,CAACC;EAAQ,GAC1BlB,KAAA,CAAAe,aAAA,CAACX,IAAI;IAACe,MAAM,EAAEX,IAAK;IAACD,KAAK,EAAEK,SAAU;IAACN,IAAI,EAAEA;EAAK,CAAE,CAC/C,CAAC;AAEX,CAAC;AAEDD,UAAU,CAACe,WAAW,GAAG,aAAa;AAEtC,MAAMH,MAAM,GAAGhB,UAAU,CAACoB,MAAM,CAAC;EAC/BH,OAAO,EAAE;IACPI,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAEF,eAAenB,UAAU;AAGzB,SAASA,UAAU","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}