Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@badrap/material-symbols-omnibus

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@badrap/material-symbols-omnibus - npm Package Compare versions

Comparing version 0.0.0 to 0.0.1

13

dist/src/index.d.ts
import React from "react";
type MaterialSymbolProps = {
export type MaterialSymbolInfo = {
height: number;
width: number;
viewBox: [number, number, number, number];
path: string;
};
export declare function resolveMaterialSymbol(props: {
name: string;
filled?: boolean;
}): MaterialSymbolInfo | undefined;
export type MaterialSymbolProps = {
name: string;
filled?: boolean;
fallback?: React.ReactNode;

@@ -9,2 +19,1 @@ className?: string;

export declare function MaterialSymbol(props: MaterialSymbolProps): React.ReactNode;
export {};
import { jsx as _jsx } from "react/jsx-runtime";
import data from "../data/symbols.json";
const hasOwnProperty = Object.prototype.hasOwnProperty;
export function resolveMaterialSymbol(props) {
const { name, filled } = props;
if (!hasOwnProperty.call(data, name)) {
return undefined;
}
return {
height: 48,
width: 48,
viewBox: [0, -960, 960, 960],
path: data[name][filled ? 1 : 0],
};
}
export function MaterialSymbol(props) {
const { name, filled, fallback, className } = props;
if (!hasOwnProperty.call(data, name)) {
const { fallback, className } = props;
const resolved = resolveMaterialSymbol(props);
if (!resolved) {
return fallback;
}
return (_jsx("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", height: "48", width: "48", fill: "currentColor", viewBox: "0 -960 960 960", children: _jsx("path", { d: data[name][filled ? 1 : 0] }) }));
return (_jsx("svg", { className: className, xmlns: "http://www.w3.org/2000/svg", height: resolved.height, width: resolved.width, viewBox: resolved.viewBox.join(""), fill: "currentColor", children: _jsx("path", { d: resolved.path }) }));
}
//# sourceMappingURL=index.js.map

5

package.json
{
"name": "@badrap/material-symbols-omnibus",
"version": "0.0.0",
"version": "0.0.1",
"type": "module",

@@ -11,3 +11,4 @@ "description": "",

"publishConfig": {
"access": "public"
"access": "public",
"provenance": true
},

@@ -14,0 +15,0 @@ "exports": "./dist/src/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc