import React, { ReactNode } from "react"; import { styled } from "styled-components"; export const StyledPill = styled.span` background-color: ${(props) => props.color || "#CCC"}; border-radius: 6px; padding: 3px 5px; `; export interface PillProps { children: ReactNode; color?: string; } export const Pill: React.FunctionComponent = ({ children, color, }) => { return {children}; }; export interface PillColumnProps { children: ReactNode; } export const PillColumn: React.FunctionComponent = ({ children, }) => { return ( {children} ); }; export interface GroupPillProps { group: string; groupColorMap: Record; children: ReactNode; } /** * Pill with colors assigned to each group name */ export const GroupPill: React.FunctionComponent = ({ group, groupColorMap, children, }) => { return ( {children} ); }; export const WarningPill: React.FunctionComponent<{ children: ReactNode }> = ({ children, }) => { return ( {children} ); }; export const GreenPill: React.FunctionComponent<{ children: ReactNode }> = ({ children, }) => { return ( {children} ); };