mirror of
https://github.com/Sea-Haven-Industries/proposal-system.git
synced 2026-10-01 23:03:13 +00:00
30 lines
632 B
TypeScript
30 lines
632 B
TypeScript
|
|
import React from 'react';
|
||
|
|
import { Chip } from 'react-native-paper';
|
||
|
|
import { statusColors } from '../theme';
|
||
|
|
|
||
|
|
interface Props {
|
||
|
|
status: string;
|
||
|
|
}
|
||
|
|
|
||
|
|
const statusLabels: Record<string, string> = {
|
||
|
|
Draft: 'Draft',
|
||
|
|
InReview: 'In Review',
|
||
|
|
Approved: 'Approved',
|
||
|
|
Sent: 'Sent',
|
||
|
|
Revised: 'Revised',
|
||
|
|
};
|
||
|
|
|
||
|
|
export function StatusChip({ status }: Props) {
|
||
|
|
const color = statusColors[status] || '#9E9E9E';
|
||
|
|
return (
|
||
|
|
<Chip
|
||
|
|
mode="flat"
|
||
|
|
compact
|
||
|
|
style={{ backgroundColor: color + '20' }}
|
||
|
|
textStyle={{ color, fontSize: 12, fontWeight: '600' }}
|
||
|
|
>
|
||
|
|
{statusLabels[status] || status}
|
||
|
|
</Chip>
|
||
|
|
);
|
||
|
|
}
|