UNPKG

1.22 kBJavaScriptView Raw
1function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
3import * as React from 'react';
4import { StyleSheet } from 'react-native';
5import StyledText from './StyledText';
6
7// @component-group Typography
8
9/**
10 * Typography component for showing a subheading.
11 *
12 * <div class="screenshots">
13 * <img src="screenshots/subheading.png" />
14 * </div>
15 *
16 * ## Usage
17 * ```js
18 * import * as React from 'react';
19 * import { Subheading } from 'react-native-paper';
20 *
21 * const MyComponent = () => (
22 * <Subheading>Subheading</Subheading>
23 * );
24 *
25 * export default MyComponent;
26 * ```
27 */
28const Subheading = props => /*#__PURE__*/React.createElement(StyledText, _extends({}, props, {
29 alpha: 0.87,
30 family: "regular",
31 style: [styles.text, props.style]
32}));
33
34export default Subheading;
35const styles = StyleSheet.create({
36 text: {
37 fontSize: 16,
38 lineHeight: 24,
39 marginVertical: 2,
40 letterSpacing: 0.5
41 }
42});
43//# sourceMappingURL=Subheading.js.map
\No newline at end of file