mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-20 13:32:00 +00:00
28 lines
609 B
TypeScript
28 lines
609 B
TypeScript
import { Text, View, StyleSheet } from '@react-pdf/renderer';
|
|
import type { Style } from '@react-pdf/types';
|
|
|
|
type PdfParamBadgeProps = {
|
|
children: React.ReactNode;
|
|
style?: Style;
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
parameterBadge: {
|
|
backgroundColor: '#F5F5F5',
|
|
color: '#333333',
|
|
padding: 4,
|
|
borderRadius: 4,
|
|
fontSize: 8,
|
|
marginRight: 8,
|
|
marginBottom: 4,
|
|
},
|
|
});
|
|
|
|
export const PdfParamBadge = ({ children, style }: PdfParamBadgeProps) => {
|
|
return (
|
|
<View style={[styles.parameterBadge, ...(style ? [style] : [])]}>
|
|
<Text>{children}</Text>
|
|
</View>
|
|
);
|
|
};
|