feat(FE): Add PDF helper components for badges and typography

This commit is contained in:
rstubryan
2026-02-09 15:58:28 +07:00
parent 4717330bc8
commit 606380460e
3 changed files with 155 additions and 0 deletions
@@ -0,0 +1,47 @@
import { Text, View, StyleSheet } from '@react-pdf/renderer';
type PdfStatusBadgeProps = {
children: React.ReactNode;
backgroundColor?: string;
textColor?: string;
borderColor?: string;
};
const styles = StyleSheet.create({
statusBadge: {
paddingVertical: 2,
paddingHorizontal: 4,
borderRadius: 12,
fontSize: 7,
fontWeight: 'bold',
borderWidth: 1,
borderStyle: 'solid',
},
statusBadgeText: {
fontSize: 7,
fontWeight: 'bold',
},
});
export const PdfStatusBadge = ({
children,
backgroundColor = '#F5F5F5',
textColor = '#333333',
borderColor = '#E5E7EB',
}: PdfStatusBadgeProps) => {
return (
<View
style={[
styles.statusBadge,
{
backgroundColor,
borderColor,
},
]}
>
<Text style={[styles.statusBadgeText, { color: textColor }]}>
{children}
</Text>
</View>
);
};