Update agents.md, add share icon to main cards
All checks were successful
Automated Container Build / build-and-push (push) Successful in 58s
All checks were successful
Automated Container Build / build-and-push (push) Successful in 58s
This commit is contained in:
parent
631dfa5923
commit
c84332d072
4 changed files with 483 additions and 6 deletions
|
|
@ -135,6 +135,7 @@ function SortableDeckCard({ deck, onEdit, onDelete, classSlug }: any) {
|
|||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||
</svg>
|
||||
</button>
|
||||
<ShareMenu targetType="DECK" contentId={deck.id} classSlug={classSlug} compact />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ function SortableQuizCard({ quiz, onEdit, onDelete, classSlug }: any) {
|
|||
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
||||
</svg>
|
||||
</button>
|
||||
<ShareMenu targetType="QUIZ" contentId={quiz.id} classSlug={classSlug} compact />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ interface ShareMenuProps {
|
|||
targetType: "DECK" | "QUIZ" | "GROUP";
|
||||
contentId: string;
|
||||
classSlug: string;
|
||||
compact?: boolean;
|
||||
}
|
||||
|
||||
export function ShareMenu({ targetType, contentId, classSlug }: ShareMenuProps) {
|
||||
export function ShareMenu({ targetType, contentId, classSlug, compact = false }: ShareMenuProps) {
|
||||
const [token, setToken] = useState<string | null>(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [open, setOpen] = useState(false);
|
||||
|
|
@ -63,7 +64,7 @@ export function ShareMenu({ targetType, contentId, classSlug }: ShareMenuProps)
|
|||
<div className="relative">
|
||||
<button
|
||||
onClick={() => setOpen(!open)}
|
||||
className="grid h-10 w-10 place-items-center rounded-xl text-text-muted transition-colors hover:bg-bg-surface-alt hover:text-primary"
|
||||
className={`${compact ? "h-8 w-8 rounded-lg" : "h-10 w-10 rounded-xl"} grid place-items-center text-text-muted transition-colors hover:bg-bg-surface-alt hover:text-primary`}
|
||||
title="Share"
|
||||
>
|
||||
<svg className="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue