
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@originvault/ov-content-viewer
Advanced tools
A Typescript, React-based UI library for fetching and viewing cheqd DIDs
OVContentViewer is a React component designed to display content in a versatile viewer. It supports full-screen mode, hover effects, and customizable rendering of resources. This component is particularly useful for displaying images and other media types in a user-friendly interface.
To use the OVContentViewer component in your project, follow these steps:
Install Dependencies: Make sure you have React and Material-UI installed in your project. If you haven't installed them yet, you can do so using npm or yarn:
npm install @mui/material @mui/icons-material
or
yarn add @mui/material @mui/icons-material
Add the Component: Import the OVContentViewer
component into your desired file:
import { OVContentViewer } from '@originvault/ov-content-viewer';
Here’s a basic example of how to use the OVContentViewer
component:
import React from 'react';
import { OVContentViewer } from '@originvault/ov-content-viewer';
const App = () => {
return (
<OVContentViewer
did="your-did-here"
src="your-image-url-here"
title="Your Title"
isDarkMode={false}
hideOriginInfoIcon={false}
type="image/png"
alt="Description of the content"
isFullScreen={false}
setIsFullScreen={(isFullScreen) => console.log(isFullScreen)}
/>
);
};
export default App;
The OVContentViewer
component accepts the following props:
Prop | Type | Description |
---|---|---|
did | string | The decentralized identifier for the content. |
size | `"sm" | "md" |
title | string | The title of the content viewer. |
render | (data: any) => React.ReactNode | Custom render function for the content. |
renderProps | `{ title?: string; onClose: () => void; validatedAt: Date | null; }` |
resourceTypes | string[] | Array of resource types to be rendered. |
resourceRenderer | (resource: any) => React.ReactNode | Custom renderer for resources. |
isFullScreen | boolean | Indicates if the viewer is in full-screen mode. |
setIsFullScreen | (isFullScreen: boolean) => void | Function to toggle full-screen mode. |
isEmbedded | boolean | Indicates if the viewer is embedded. |
isHoverable | boolean | Indicates if hover effects are enabled. |
hideOriginInfoIcon | boolean | Hides the origin info icon if true. |
src | string | The source URL of the content to be displayed. |
type | string | The MIME type of the content. Default is "image/png". |
alt | string | Alternative text for the content. |
isDarkMode | boolean | Indicates if dark mode is enabled. |
embeddedBackgroundColor | string | Background color for embedded mode. |
isMobile | boolean | Indicates if the viewer is being used on a mobile device. |
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
FAQs
A Typescript, React-based UI library for fetching and viewing cheqd DIDs
We found that @originvault/ov-content-viewer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.