diff --git a/frontend/src/components/regex/RegexCard.jsx b/frontend/src/components/regex/RegexCard.jsx index 52e332e..de6f000 100644 --- a/frontend/src/components/regex/RegexCard.jsx +++ b/frontend/src/components/regex/RegexCard.jsx @@ -1,7 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import {Copy, Check} from 'lucide-react'; +import {Copy, Check, FlaskConical} from 'lucide-react'; import Tooltip from '@ui/Tooltip'; +import ReactMarkdown from 'react-markdown'; const RegexCard = ({ pattern, @@ -33,132 +34,151 @@ const RegexCard = ({ }; const handleMouseDown = e => { - // Prevent text selection when shift-clicking if (e.shiftKey) { e.preventDefault(); } }; + const getTestColor = () => { + if (totalTests === 0) return 'text-gray-400'; + if (passRate === 100) return 'text-green-400'; + if (passRate >= 80) return 'text-yellow-400'; + return 'text-red-400'; + }; + return (
+ {pattern.pattern}
+
- {pattern.pattern}
-
- - {pattern.description} -
- )} - - {/* Bottom Metadata */} -