mirror of
https://github.com/AustinKelsay/plebdevs.git
synced 2025-06-04 08:12:02 +00:00
Fixed md form styles
This commit is contained in:
parent
4ac66f234b
commit
b92a0ada02
1014
package-lock.json
generated
1014
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
||||
"dependencies": {
|
||||
"@getalby/bitcoin-connect-react": "^3.5.3",
|
||||
"@prisma/client": "^5.17.0",
|
||||
"@uiw/react-md-editor": "^3.6.0",
|
||||
"@uiw/react-md-editor": "^3.11.0",
|
||||
"axios": "^1.7.2",
|
||||
"bech32": "^2.0.0",
|
||||
"light-bolt11-decoder": "^3.1.1",
|
||||
|
@ -287,13 +287,13 @@ const CourseForm = () => {
|
||||
<div className="p-inputgroup flex-1">
|
||||
<InputText value={title} onChange={(e) => setTitle(e.target.value)} placeholder="Title" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={summary} onChange={(e) => setSummary(e.target.value)} placeholder="Summary" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={coverImage} onChange={(e) => setCoverImage(e.target.value)} placeholder="Cover Image URL" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8 flex-col">
|
||||
<div className="p-inputgroup flex-1 mt-4 flex-col">
|
||||
<p className="py-2">Paid Course</p>
|
||||
<InputSwitch checked={checked} onChange={(e) => setChecked(e.value)} />
|
||||
{checked && (
|
||||
@ -303,15 +303,15 @@ const CourseForm = () => {
|
||||
)}
|
||||
</div>
|
||||
<div className="mt-8 flex-col w-full">
|
||||
<div className="mt-8 flex-col w-full">
|
||||
<div className="mt-4 flex-col w-full">
|
||||
{selectedLessons.map((lesson, index) => (
|
||||
<div key={lesson.id} className="p-inputgroup flex-1 mt-8">
|
||||
<div key={lesson.id} className="p-inputgroup flex-1 mt-4">
|
||||
<ContentDropdownItem content={lesson} selected={true} />
|
||||
<Button icon="pi pi-times" className="p-button-danger" onClick={() => removeLesson(index)} />
|
||||
</div>
|
||||
))}
|
||||
{lessons.map((lesson, index) => (
|
||||
<div key={lesson.id} className="p-inputgroup flex-1 mt-8">
|
||||
<div key={lesson.id} className="p-inputgroup flex-1 mt-4">
|
||||
<Dropdown
|
||||
value={lesson.title}
|
||||
options={getContentOptions(index)}
|
||||
@ -326,9 +326,9 @@ const CourseForm = () => {
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
<div className="mt-8 flex-col w-full">
|
||||
<div className="mt-4 flex-col w-full">
|
||||
{topics.map((topic, index) => (
|
||||
<div key={index} className="p-inputgroup flex-1 mt-8">
|
||||
<div key={index} className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={topic} onChange={(e) => handleTopicChange(index, e.target.value)} placeholder={`Topic #${index + 1}`} className="w-full" />
|
||||
{index > 0 && (
|
||||
<Button icon="pi pi-times" className="p-button-danger mt-2" onClick={() => removeTopic(index)} />
|
||||
|
@ -289,50 +289,53 @@ const ResourceForm = ({ draft = null }) => {
|
||||
);
|
||||
|
||||
return (
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className="p-inputgroup flex-1">
|
||||
<InputText value={title} onChange={(e) => setTitle(e.target.value)} placeholder="Title" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<InputText value={summary} onChange={(e) => setSummary(e.target.value)} placeholder="Summary" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<InputText value={coverImage} onChange={(e) => setCoverImage(e.target.value)} placeholder="Cover Image URL" />
|
||||
</div>
|
||||
<form onSubmit={handleSubmit}>
|
||||
<div className="p-inputgroup flex-1">
|
||||
<InputText value={title} onChange={(e) => setTitle(e.target.value)} placeholder="Title" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={summary} onChange={(e) => setSummary(e.target.value)} placeholder="Summary" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={coverImage} onChange={(e) => setCoverImage(e.target.value)} placeholder="Cover Image URL" />
|
||||
</div>
|
||||
|
||||
<div className="p-inputgroup flex-1 mt-8 flex-col">
|
||||
<p className="py-2">Paid Resource</p>
|
||||
<InputSwitch checked={isPaidResource} onChange={(e) => setIsPaidResource(e.value)} />
|
||||
{isPaidResource && (
|
||||
<div className="p-inputgroup flex-1 py-4">
|
||||
<InputNumber value={price} onValueChange={(e) => setPrice(e.value)} placeholder="Price (sats)" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 flex-col mt-8">
|
||||
<span>Content</span>
|
||||
<div className="p-inputgroup flex-1 mt-8 flex-col">
|
||||
<p className="py-2">Paid Resource</p>
|
||||
<InputSwitch checked={isPaidResource} onChange={(e) => setIsPaidResource(e.value)} />
|
||||
{isPaidResource && (
|
||||
<div className="p-inputgroup flex-1 py-4">
|
||||
<InputNumber value={price} onValueChange={(e) => setPrice(e.value)} placeholder="Price (sats)" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 flex-col mt-4">
|
||||
<span>Content</span>
|
||||
<div data-color-mode="dark">
|
||||
<MDEditor
|
||||
value={content}
|
||||
onChange={handleContentChange}
|
||||
height={350}
|
||||
/>
|
||||
</div>
|
||||
<div className="mt-8 flex-col w-full">
|
||||
{topics.map((topic, index) => (
|
||||
<div className="p-inputgroup flex-1" key={index}>
|
||||
<InputText value={topic} onChange={(e) => handleTopicChange(index, e.target.value)} placeholder="Topic" className="w-full mt-2" />
|
||||
{index > 0 && (
|
||||
<Button icon="pi pi-times" className="p-button-danger mt-2" onClick={(e) => removeTopic(e, index)} />
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
<div className="w-full flex flex-row items-end justify-end py-2">
|
||||
<Button icon="pi pi-plus" onClick={addTopic} />
|
||||
</div>
|
||||
<div className="mt-8 flex-col w-full">
|
||||
{topics.map((topic, index) => (
|
||||
<div className="p-inputgroup flex-1" key={index}>
|
||||
<InputText value={topic} onChange={(e) => handleTopicChange(index, e.target.value)} placeholder="Topic" className="w-full mt-2" />
|
||||
{index > 0 && (
|
||||
<Button icon="pi pi-times" className="p-button-danger mt-2" onClick={(e) => removeTopic(e, index)} />
|
||||
)}
|
||||
</div>
|
||||
))}
|
||||
<div className="w-full flex flex-row items-end justify-end py-2">
|
||||
<Button icon="pi pi-plus" onClick={addTopic} />
|
||||
</div>
|
||||
<div className="flex justify-center mt-8">
|
||||
<Button type="submit" severity="success" outlined label={draft ? "Update" : "Submit"} />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div className="flex justify-center mt-8">
|
||||
<Button type="submit" severity="success" outlined label={draft ? "Update" : "Submit"} />
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -116,11 +116,11 @@ const WorkshopForm = ({ draft = null }) => {
|
||||
<div className="p-inputgroup flex-1">
|
||||
<InputText value={title} onChange={(e) => setTitle(e.target.value)} placeholder="Title" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={summary} onChange={(e) => setSummary(e.target.value)} placeholder="Summary" />
|
||||
</div>
|
||||
|
||||
<div className="p-inputgroup flex-1 mt-8 flex-col">
|
||||
<div className="p-inputgroup flex-1 mt-4 flex-col">
|
||||
<p className="py-2">Paid Workshop</p>
|
||||
<InputSwitch checked={isPaidResource} onChange={(e) => setIsPaidResource(e.value)} />
|
||||
{isPaidResource && (
|
||||
@ -130,13 +130,13 @@ const WorkshopForm = ({ draft = null }) => {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={videoUrl} onChange={(e) => setVideoUrl(e.target.value)} placeholder="Video URL" />
|
||||
</div>
|
||||
<div className="p-inputgroup flex-1 mt-8">
|
||||
<div className="p-inputgroup flex-1 mt-4">
|
||||
<InputText value={coverImage} onChange={(e) => setCoverImage(e.target.value)} placeholder="Cover Image URL" />
|
||||
</div>
|
||||
<div className="mt-8 flex-col w-full">
|
||||
<div className="mt-4 flex-col w-full">
|
||||
{topics.map((topic, index) => (
|
||||
<div className="p-inputgroup flex-1" key={index}>
|
||||
<InputText value={topic} onChange={(e) => handleTopicChange(index, e.target.value)} placeholder="Topic" className="w-full mt-2" />
|
||||
|
@ -89,4 +89,10 @@ h3 {
|
||||
|
||||
.p-tabmenu .p-tabmenu-nav::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.w-md-editor-toolbar button > * {
|
||||
font-size: 16px !important;
|
||||
width: 16px !important;
|
||||
height: 16px !important;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user