Improve product cards/pagination, Farsi locale fonts, and super-admin migrate UI.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
2e40d5eb4c
commit
f5b2193ba1
@@ -1,4 +1,4 @@
|
||||
import { FolderPlus, Trash2, ChevronRight } from 'lucide-react'
|
||||
import { FolderPlus, Pencil, Trash2, ChevronRight } from 'lucide-react'
|
||||
import type { Category } from '../types/category'
|
||||
import { Tooltip } from './Tooltip'
|
||||
import styles from './CategoryRow.module.css'
|
||||
@@ -10,6 +10,7 @@ interface BlogCategoryRowProps {
|
||||
expanded: boolean
|
||||
onToggle: () => void
|
||||
onAddSub: (id: string) => void
|
||||
onEdit: (id: string) => void
|
||||
onRemove: (id: string) => void
|
||||
}
|
||||
|
||||
@@ -20,10 +21,11 @@ export function BlogCategoryRow({
|
||||
expanded,
|
||||
onToggle,
|
||||
onAddSub,
|
||||
onEdit,
|
||||
onRemove,
|
||||
}: BlogCategoryRowProps) {
|
||||
return (
|
||||
<div className={styles.row} style={{ marginLeft: depth * 28 }}>
|
||||
<div className={styles.row} style={{ marginLeft: depth * 8 }}>
|
||||
<div
|
||||
className={`${styles.info} ${hasChildren ? styles.clickable : ''}`}
|
||||
onClick={hasChildren ? onToggle : undefined}
|
||||
@@ -59,6 +61,7 @@ export function BlogCategoryRow({
|
||||
<div className={styles.controls}>
|
||||
<Tooltip label="Add sub category">
|
||||
<button
|
||||
type="button"
|
||||
className={styles.controlBtn}
|
||||
onClick={() => onAddSub(category.id)}
|
||||
aria-label="Add sub category"
|
||||
@@ -66,8 +69,19 @@ export function BlogCategoryRow({
|
||||
<FolderPlus size={17} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<Tooltip label="Edit category">
|
||||
<button
|
||||
type="button"
|
||||
className={styles.controlBtn}
|
||||
onClick={() => onEdit(category.id)}
|
||||
aria-label="Edit category"
|
||||
>
|
||||
<Pencil size={17} />
|
||||
</button>
|
||||
</Tooltip>
|
||||
<Tooltip label="Remove category">
|
||||
<button
|
||||
type="button"
|
||||
className={`${styles.controlBtn} ${styles.danger}`}
|
||||
onClick={() => onRemove(category.id)}
|
||||
aria-label="Remove"
|
||||
|
||||
Reference in New Issue
Block a user