UNPKG

repoweaver

Version:

A GitHub App that skillfully weaves multiple templates together to create and update repositories with intelligent merge strategies

1 lines 1.97 kB
{"ast":null,"code":"import color from 'color';\nimport { tokens } from \"../../styles/themes/v3/tokens\";\nexport const getToggleButtonColor = ({\n theme,\n checked\n}) => {\n if (checked) {\n if (theme.isV3) {\n return color(theme.colors.onSecondaryContainer).alpha(tokens.md.ref.opacity.level2).rgb().string();\n }\n if (theme.dark) {\n return 'rgba(255, 255, 255, .12)';\n }\n return 'rgba(0, 0, 0, .08)';\n }\n return 'transparent';\n};","map":{"version":3,"names":["color","tokens","getToggleButtonColor","theme","checked","isV3","colors","onSecondaryContainer","alpha","md","ref","opacity","level2","rgb","string","dark"],"sources":["/Users/pmouli/Documents/GitHub.nosync/boots-strapper/mobile/node_modules/react-native-paper/src/components/ToggleButton/utils.ts"],"sourcesContent":["import color from 'color';\n\nimport { tokens } from '../../styles/themes/v3/tokens';\nimport type { InternalTheme } from '../../types';\n\nexport const getToggleButtonColor = ({\n theme,\n checked,\n}: {\n theme: InternalTheme;\n checked: boolean | null;\n}) => {\n if (checked) {\n if (theme.isV3) {\n return color(theme.colors.onSecondaryContainer)\n .alpha(tokens.md.ref.opacity.level2)\n .rgb()\n .string();\n }\n if (theme.dark) {\n return 'rgba(255, 255, 255, .12)';\n }\n return 'rgba(0, 0, 0, .08)';\n }\n return 'transparent';\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AAEzB,SAASC,MAAM;AAGf,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK;EACLC;AAIF,CAAC,KAAK;EACJ,IAAIA,OAAO,EAAE;IACX,IAAID,KAAK,CAACE,IAAI,EAAE;MACd,OAAOL,KAAK,CAACG,KAAK,CAACG,MAAM,CAACC,oBAAoB,CAAC,CAC5CC,KAAK,CAACP,MAAM,CAACQ,EAAE,CAACC,GAAG,CAACC,OAAO,CAACC,MAAM,CAAC,CACnCC,GAAG,CAAC,CAAC,CACLC,MAAM,CAAC,CAAC;IACb;IACA,IAAIX,KAAK,CAACY,IAAI,EAAE;MACd,OAAO,0BAA0B;IACnC;IACA,OAAO,oBAAoB;EAC7B;EACA,OAAO,aAAa;AACtB,CAAC","ignoreList":[]},"metadata":{"hasCjsExports":false},"sourceType":"module","externalDependencies":[]}