Vendored Augani/openreel-video (MIT) into services/editor and wired it to the MAM. Editor runs as its own container on port 47435. Library assets pull in via ?asset=<uuid>; render exports route back via POST /api/v1/upload/simple. Sidebar Editor link on every page; Edit button on every preview modal. See services/editor/INTEGRATION.md for the patch map.
30 lines
805 B
TypeScript
30 lines
805 B
TypeScript
import * as React from "react"
|
|
import { Button, type ButtonProps } from "./button"
|
|
import { cn } from "@openreel/ui/lib/utils"
|
|
|
|
export interface IconButtonProps extends Omit<ButtonProps, 'children'> {
|
|
icon: React.ElementType
|
|
iconSize?: number
|
|
}
|
|
|
|
const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(
|
|
({ icon: Icon, iconSize = 14, className, variant = "ghost", size = "icon-xs", ...props }, ref) => {
|
|
return (
|
|
<Button
|
|
ref={ref}
|
|
variant={variant}
|
|
size={size}
|
|
className={cn(
|
|
"text-text-secondary hover:text-text-primary hover:bg-background-elevated",
|
|
className
|
|
)}
|
|
{...props}
|
|
>
|
|
<Icon size={iconSize} />
|
|
</Button>
|
|
)
|
|
}
|
|
)
|
|
IconButton.displayName = "IconButton"
|
|
|
|
export { IconButton }
|