Skip to content

Commit

Permalink
update index.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
redwest88 authored Nov 5, 2024
1 parent 1c0370a commit ccc421b
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions src/components/PeersActiveSet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,21 @@ interface BooleanDisplayProps {
}

const BooleanDisplay: React.FC<BooleanDisplayProps> = ({ value }) => {
const styles = {
badge: {
display: 'inline-flex',
alignItems: 'center',
padding: '4px 12px',
borderRadius: '4px',
fontSize: '14px',
fontWeight: 500,
backgroundColor: value ? '#ecfdf5' : '#fef2f2',
color: value ? '#047857' : '#b91c1c',
} as React.CSSProperties
};

return (
<span
className={`inline-flex items-center px-3 py-1 rounded-md text-sm font-medium ${
value
? 'bg-green-100 text-green-800'
: 'bg-red-100 text-red-800'
}`}
>
<span style={styles.badge}>
{value ? 'Yes' : 'No'}
</span>
);
Expand Down

0 comments on commit ccc421b

Please sign in to comment.