Issue{' '}
#{issue.number}
{issue.title}
Opened on {new Date(issue.created_at).toLocaleDateString('en-US', { month: 'short', day: 'numeric', year: 'numeric' })} {issue.user?.login && `by ${issue.user?.login}`}
{issue.labels.length > 0 && (
{issue.labels.map(label => {
const labelString = typeof label === 'string' ? label : label.name ?? '';
const colors = getLabelColors(labelString);
return ;
})}
)}
);
};
interface TagProps {
text: string;
fontSize?: string;
color?: string;
backgroundColor?: string;
borderColor?: string;
border?: boolean;
onClick?: () => void;
}
// Small tag for labels of the issue
export const Tag = ({ text, color, backgroundColor, fontSize, border, borderColor, onClick }: TagProps) => {
return (
{})}
className="report-tag"
style={{ color: color ?? '#ffffff', backgroundColor: backgroundColor ?? '#347bff', cursor: onClick ? 'pointer' : 'auto', fontSize: fontSize ?? '10px', border: border ? '1px solid' : 'none', borderColor: borderColor ?? '#94a3b8' }}>
{text}
);
};