From 031bef1cd8109e596b75468ea12e5f2fbf276d97 Mon Sep 17 00:00:00 2001 From: Sam Chau Date: Sun, 19 Jan 2025 12:56:32 +1030 Subject: [PATCH] feat: enhance RegexGeneralTab with MarkdownEditor and improved styling for inputs and tags --- .../src/components/regex/RegexGeneralTab.jsx | 111 +++++++++++------- 1 file changed, 66 insertions(+), 45 deletions(-) diff --git a/frontend/src/components/regex/RegexGeneralTab.jsx b/frontend/src/components/regex/RegexGeneralTab.jsx index 4041220..b18db9f 100644 --- a/frontend/src/components/regex/RegexGeneralTab.jsx +++ b/frontend/src/components/regex/RegexGeneralTab.jsx @@ -1,6 +1,7 @@ import React, {useState} from 'react'; import PropTypes from 'prop-types'; -import TextArea from '../ui/TextArea'; +import MarkdownEditor from '@ui/MarkdownEditor'; +import AddButton from '@ui/DataBar/AddButton'; import {InfoIcon} from 'lucide-react'; const RegexGeneralTab = ({ @@ -41,19 +42,24 @@ const RegexGeneralTab = ({

)} -
+
{/* Name Input */}
- +
+ +

+ Give your regex pattern a descriptive name +

+
onNameChange(e.target.value)} placeholder='Enter pattern name' className='w-full rounded-md border border-gray-300 dark:border-gray-600 - bg-white dark:bg-gray-700 px-3 py-2 text-sm + bg-gray-50 dark:bg-gray-800 px-3 py-2 text-sm text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent @@ -63,33 +69,37 @@ const RegexGeneralTab = ({ {/* Description */}
- -