Bin
2025-12-16 9e0b2ba2c317b1a86212f24cbae3195ad1f3dbfa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import type { CSSProperties, FC } from "react";
import { observer } from "mobx-react";
import { cn } from "../../utils/bem";
 
interface ObjectTagViewProps {
  item: any;
  className?: string;
  style?: CSSProperties;
}
 
/**
 * Object Tag Component
 */
const ObjectTagView: FC<ObjectTagViewProps> = ({ item, style, className, children }) => {
  const moreProps = item.getProps && item.getProps();
  const objectClassName = cn("object").toClassName();
 
  return (
    <div
      className={[objectClassName, className].join(" ")}
      data-needs-update={item._needsUpdate}
      style={style}
      {...moreProps}
    >
      {children}
    </div>
  );
};
 
export const ObjectTag = observer(ObjectTagView);
 
export default observer(ObjectTagView);