import React from 'react';
import './Component.scss';

export const Tags = (status)=>{
  switch(status){
    case "running":
      return(
        <span className="statusColor running">运行中</span>
      );
    case "failure":case"error":
      return (
        <span className="statusColor failed">未通过</span>
      );
    case "success":
      return (
        <span className="statusColor pass">已通过</span>
      );
    case "pending":
      return (
        <span className="statusColor Preparing">准备中</span>
      );
    case 'killed':
      return (
        <span className="statusColor killed">已撤销</span>
      );
  }
}

export const TagsLine = (status)=>{
  switch(status){
    case "running":
      return(
        <span className="statuslineColor running">运行中</span>
      );
    case "failure":case "error":
      return (
        <span className="statuslineColor failed">未通过</span>
      );
    case "success":
      return (
        <span className="statuslineColor pass">已通过</span>
      );
    case "pending":
      return (
        <span className="statuslineColor Preparing">准备中</span>
      );
    case 'killed':
      return (
        <span className="statuslineColor killed">已撤销</span>
      );
    case 'skipped':
      return (
        <span className="statuslineColor skipped">已跳过</span>
      );
  }
}
