mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: add indication of elem nature in course edit
This commit is contained in:
parent
3a898eb29a
commit
018e20c10e
7 changed files with 202 additions and 230 deletions
|
|
@ -4,6 +4,7 @@ import { Draggable } from "react-beautiful-dnd";
|
|||
import { EyeOpenIcon, Pencil2Icon } from '@radix-ui/react-icons'
|
||||
import styled from "styled-components";
|
||||
import { getUriWithOrg } from "@services/config/config";
|
||||
import { FileText, Video, Sparkles } from "lucide-react";
|
||||
|
||||
function Activity(props: any) {
|
||||
|
||||
|
|
@ -12,16 +13,24 @@ function Activity(props: any) {
|
|||
{(provided) => (
|
||||
<div
|
||||
className="flex flex-row items-center py-2 my-3 rounded-md justify-center bg-gray-50 hover:bg-gray-100 space-x-2 w-auto" key={props.activity.id} {...provided.draggableProps} {...provided.dragHandleProps} ref={provided.innerRef}>
|
||||
<p>{props.activity.name} </p>
|
||||
<div >
|
||||
{props.activity.type === "video" && <Video size={16} />}
|
||||
{props.activity.type === "documentpdf" && <FileText size={16} />}
|
||||
{props.activity.type === "dynamic" && <Sparkles size={16} />}
|
||||
|
||||
</div>
|
||||
<p className="first-letter:uppercase">{props.activity.name} </p>
|
||||
<Link
|
||||
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}`}
|
||||
|
||||
rel="noopener noreferrer"> <EyeOpenIcon />
|
||||
className=" hover:cursor-pointer p-1 rounded-md bg-slate-200"
|
||||
rel="noopener noreferrer">
|
||||
<EyeOpenIcon className="text-slate-700"/>
|
||||
</Link>
|
||||
<Link
|
||||
href={getUriWithOrg(props.orgslug, "") + `/course/${props.courseid}/activity/${props.activity.id.replace("activity_", "")}/edit`}
|
||||
className=" hover:cursor-pointer p-1 rounded-md bg-slate-200"
|
||||
rel="noopener noreferrer">
|
||||
<Pencil2Icon />
|
||||
<Pencil2Icon className="text-slate-700" />
|
||||
</Link>
|
||||
</div>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue