Added support for PDF bulletpoints
This commit is contained in:
24
src/exams/pdf/list.item.tsx
Normal file
24
src/exams/pdf/list.item.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import { Text, View, StyleSheet } from "@react-pdf/renderer";
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
row: {
|
||||
display: "flex",
|
||||
flexDirection: "row",
|
||||
},
|
||||
bullet: {
|
||||
height: "100%",
|
||||
},
|
||||
});
|
||||
|
||||
const ListItem = ({ text, textStyle }: { text: string, textStyle: any[] }) => {
|
||||
return (
|
||||
<View style={styles.row}>
|
||||
<View style={styles.bullet}>
|
||||
<Text style={textStyle}>{"\u2022" + " "}</Text>
|
||||
</View>
|
||||
<Text style={textStyle}>{text}</Text>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
export default ListItem;
|
||||
Reference in New Issue
Block a user