-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Expand file tree
/
Copy pathParagraph.tsx
More file actions
50 lines (44 loc) · 1000 Bytes
/
Paragraph.tsx
File metadata and controls
50 lines (44 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import * as React from 'react';
import { TextProps, StyleSheet } from 'react-native';
import StyledText from './StyledText';
export type Props = TextProps & {
children: React.ReactNode;
};
// @component-group Typography
/**
* @deprecated Deprecated in v5.x - use `<Text variant="bodyMedium" />` instead.
* Typography component for showing a paragraph.
*
* <div class="screenshots">
* <img src="screenshots/paragraph.png" />
* </div>
*
* ## Usage
* ```js
* import * as React from 'react';
* import { Paragraph } from 'react-native-paper';
*
* const MyComponent = () => (
* <Paragraph>Paragraph</Paragraph>
* );
*
* export default MyComponent;
* ```
*/
const Paragraph = (props: Props) => (
<StyledText
{...props}
alpha={0.87}
family="regular"
style={[styles.text, props.style]}
/>
);
export default Paragraph;
const styles = StyleSheet.create({
text: {
fontSize: 14,
lineHeight: 20,
marginVertical: 2,
letterSpacing: 0.25,
},
});