import { Path, StyleSheet, Svg, Text, View } from "@react-pdf/renderer";
import { Style } from "../types.js";
// https://github.com/diegomura/react-pdf/issues/134
const PIXELS_PER_POINT = 0.75;
const styles = StyleSheet.create({
listItem: {
display: "flex",
flexDirection: "row",
gap: 8 * PIXELS_PER_POINT,
paddingRight: 10, // otherwise text overflows, seems like a react-pdf / yoga bug
},
bullet: {
// fontFamily: "", // we could add symbol font if we don't want to use inter (default font) here
},
});
export const BULLET_MARKER = "\u2022";
// https://fonts.google.com/icons?selected=Material+Symbols+Rounded:chevron_right:FILL@0;wght@700;GRAD@0;opsz@24&icon.query=chevron&icon.style=Rounded&icon.size=24&icon.color=%23e8eaed
export const CHEVRON_MARKER = (
);
// https://fonts.google.com/icons?selected=Material+Symbols+Outlined:check_box_outline_blank:FILL@0;wght@400;GRAD@0;opsz@24&icon.size=24&icon.color=undefined
export const CHECK_MARKER_UNCHECKED = (
);
// https://fonts.google.com/icons?selected=Material+Symbols+Outlined:check_box:FILL@0;wght@400;GRAD@0;opsz@24&icon.size=24&icon.color=undefined
export const CHECK_MARKER_CHECKED = (
);
export const ListItem = ({
listMarker,
children,
style,
}: {
listMarker: string | React.ReactNode;
children: React.ReactNode;
style?: Style;
}) => {
return (
{/* */}
{typeof listMarker === "string" ? (
{listMarker}
) : (
listMarker
)}
{children}
);
};