UNPKG

1.74 kBSource Map (JSON)View Raw
1{"version":3,"sources":["Caption.tsx"],"names":["Caption","props","styles","text","style","StyleSheet","create","fontSize","lineHeight","marginVertical","letterSpacing"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;;;AAOA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,OAAO,GAAIC,KAAD,iBACd,oBAAC,mBAAD,eACMA,KADN;AAEE,EAAA,KAAK,EAAE,IAFT;AAGE,EAAA,MAAM,EAAC,SAHT;AAIE,EAAA,KAAK,EAAE,CAACC,MAAM,CAACC,IAAR,EAAcF,KAAK,CAACG,KAApB;AAJT,GADF;;eASeJ,O;;;AAEf,MAAME,MAAM,GAAGG,wBAAWC,MAAX,CAAkB;AAC/BH,EAAAA,IAAI,EAAE;AACJI,IAAAA,QAAQ,EAAE,EADN;AAEJC,IAAAA,UAAU,EAAE,EAFR;AAGJC,IAAAA,cAAc,EAAE,CAHZ;AAIJC,IAAAA,aAAa,EAAE;AAJX;AADyB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { Text, TextStyle, StyleSheet, StyleProp } from 'react-native';\nimport StyledText from './StyledText';\n\ntype Props = React.ComponentProps<typeof Text> & {\n style?: StyleProp<TextStyle>;\n children: React.ReactNode;\n};\n\n// @component-group Typography\n\n/**\n * Typography component for showing a caption.\n *\n * <div class=\"screenshots\">\n * <img src=\"screenshots/caption.png\" />\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Caption } from 'react-native-paper';\n *\n * const MyComponent = () => (\n * <Caption>Caption</Caption>\n * );\n *\n * export default MyComponent;\n * ```\n */\nconst Caption = (props: Props) => (\n <StyledText\n {...props}\n alpha={0.54}\n family=\"regular\"\n style={[styles.text, props.style]}\n />\n);\n\nexport default Caption;\n\nconst styles = StyleSheet.create({\n text: {\n fontSize: 12,\n lineHeight: 20,\n marginVertical: 2,\n letterSpacing: 0.4,\n },\n});\n"]}
\No newline at end of file