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

@dynamic-labs/iconic

Package Overview
Dependencies
Maintainers
2
Versions
338
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dynamic-labs/iconic - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

108

dist/src/IconComponent.d.ts
/// <reference types="react" />
type Resolutions = readonly string[];
type UnionOfResolutions<T extends Resolutions> = T extends T ? T[number] : never;
type Formats<T extends Resolutions> = {
[key in UnionOfResolutions<T>]: {
height: number;
width: number;
};
};
export declare const IconComponentKlass: (props: {
categoryName: string;
}) => <T extends Resolutions>(classProps: {
resolutions: T;
}) => (classProps: {
alt: string;

@@ -18,7 +9,11 @@ iconName: string;

new (props: {
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
} | Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>): {

@@ -28,16 +23,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: T;
readonly formats: Formats<T>;
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>;

@@ -50,4 +47,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -57,8 +56,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -68,21 +71,31 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: {
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}, context: any): {

@@ -92,16 +105,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: T;
readonly formats: Formats<T>;
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>;

@@ -114,4 +129,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -121,8 +138,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -132,16 +153,24 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: UnionOfResolutions<T>;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;

@@ -151,2 +180,1 @@ };

};
export {};

@@ -8,20 +8,11 @@ "use strict";

class IconComponent extends react_1.Component {
get formats() {
const formats = Object.create({});
this.resolutions.forEach((resolution) => {
const [width, height] = resolution.split('x').map((x) => parseInt(x));
formats[resolution] = { height, width };
});
return formats;
get iconPath() {
return `icons/${this.categoryName}/${this.iconName}.svg`;
}
get sourcePath() {
return `icons/${this.categoryName}/${this.iconName}`;
get url() {
return `${CDN_BASE_URL}/${this.iconPath}`;
}
get baseUrl() {
return `${CDN_BASE_URL}/${this.sourcePath}/${this.iconName}_${this.props.size}`;
}
render() {
var _a, _b;
const props = Object.assign(Object.assign({ alt: (_a = this.alt) !== null && _a !== void 0 ? _a : '' }, this.props), { iconName: this.iconName, height: this.formats[this.props.size].height, width: this.formats[this.props.size].height, size: this.props.size });
return ((0, jsx_runtime_1.jsxs)("picture", Object.assign({ "data-testid": `${this.iconName}-icon` }, { children: [(0, jsx_runtime_1.jsx)("source", { type: "image/webp", srcSet: `${this.baseUrl}.webp` }), (0, jsx_runtime_1.jsx)("img", { src: `${this.baseUrl}.png`, alt: (_b = props.alt) !== null && _b !== void 0 ? _b : '', width: props.width, height: props.height, className: props.className })] })));
var _a;
return (0, jsx_runtime_1.jsx)("img", Object.assign({ src: this.url }, this.props, { alt: (_a = this.alt) !== null && _a !== void 0 ? _a : this.props.alt }));
}

@@ -37,3 +28,2 @@ }

this.categoryName = props.categoryName;
this.resolutions = classProps.resolutions;
}

@@ -40,0 +30,0 @@ };

/// <reference types="react" />
declare const BraveIcon_base: {
new (props: {
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
} | Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>): {

@@ -13,29 +17,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: readonly ["24x24", "32x32", "16x16"];
readonly formats: {
"24x24": {
height: number;
width: number;
};
"32x32": {
height: number;
width: number;
};
"16x16": {
height: number;
width: number;
};
};
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>;

@@ -48,4 +41,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -55,8 +50,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -66,21 +65,31 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: {
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}, context: any): {

@@ -90,29 +99,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: readonly ["24x24", "32x32", "16x16"];
readonly formats: {
"24x24": {
height: number;
width: number;
};
"32x32": {
height: number;
width: number;
};
"16x16": {
height: number;
width: number;
};
};
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>;

@@ -125,4 +123,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -132,8 +132,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -143,16 +147,24 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32" | "16x16";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;

@@ -159,0 +171,0 @@ };

@@ -7,4 +7,3 @@ "use strict";

alt: 'Brave Browser',
iconName: 'brave',
resolutions: ['24x24', '32x32', '16x16']
iconName: 'brave'
}) {

@@ -11,0 +10,0 @@ }

/// <reference types="react" />
export declare const BrowserIconComponent: <T extends readonly string[]>(classProps: {
resolutions: T;
export declare const BrowserIconComponent: (classProps: {
alt: string;

@@ -8,7 +7,11 @@ iconName: string;

new (props: {
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
} | Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>): {

@@ -18,19 +21,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: T;
readonly formats: { [key in T extends T ? T[number] : never]: {
height: number;
width: number;
}; };
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>;

@@ -43,4 +45,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -50,8 +54,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -61,21 +69,31 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: {
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}, context: any): {

@@ -85,19 +103,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: T;
readonly formats: { [key in T extends T ? T[number] : never]: {
height: number;
width: number;
}; };
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>;

@@ -110,4 +127,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -117,8 +136,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -128,16 +151,24 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;

@@ -144,0 +175,0 @@ };

/// <reference types="react" />
declare const ArbitrumIcon_base: {
new (props: {
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
} | Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>): {

@@ -13,25 +17,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: readonly ["24x24", "32x32"];
readonly formats: {
"24x24": {
height: number;
width: number;
};
"32x32": {
height: number;
width: number;
};
};
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>;

@@ -44,4 +41,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -51,8 +50,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -62,21 +65,31 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: {
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}, context: any): {

@@ -86,25 +99,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: readonly ["24x24", "32x32"];
readonly formats: {
"24x24": {
height: number;
width: number;
};
"32x32": {
height: number;
width: number;
};
};
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>;

@@ -117,4 +123,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -124,8 +132,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -135,16 +147,24 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: "24x24" | "32x32";
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;

@@ -151,0 +171,0 @@ };

@@ -7,4 +7,3 @@ "use strict";

alt: 'Arbitrum Browser',
iconName: 'arbitrum',
resolutions: ['24x24', '32x32']
iconName: 'arbitrum'
}) {

@@ -11,0 +10,0 @@ }

/// <reference types="react" />
export declare const ChainIconComponent: <T extends readonly string[]>(classProps: {
resolutions: T;
export declare const ChainIconComponent: (classProps: {
alt: string;

@@ -8,7 +7,11 @@ iconName: string;

new (props: {
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
} | Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>): {

@@ -18,19 +21,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: T;
readonly formats: { [key in T extends T ? T[number] : never]: {
height: number;
width: number;
}; };
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>;

@@ -43,4 +45,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -50,8 +54,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -61,21 +69,31 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
};
new (props: {
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}, context: any): {

@@ -85,19 +103,18 @@ readonly iconName: string;

readonly categoryName: string;
readonly resolutions: T;
readonly formats: { [key in T extends T ? T[number] : never]: {
height: number;
width: number;
}; };
readonly sourcePath: string;
readonly baseUrl: string;
readonly iconPath: string;
readonly url: string;
render(): JSX.Element;
context: unknown;
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>) => {} | Pick<{}, K>) | Pick<{}, K>, callback?: () => void): void;
forceUpdate(callback?: () => void): void;
readonly props: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>;

@@ -110,4 +127,6 @@ state: Readonly<{}>;

shouldComponentUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): boolean;

@@ -117,8 +136,12 @@ componentWillUnmount?(): void;

getSnapshotBeforeUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>): any;
componentDidUpdate?(prevProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, prevState: Readonly<{}>, snapshot?: any): void;

@@ -128,16 +151,24 @@ componentWillMount?(): void;

componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextContext: any): void;
componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;
UNSAFE_componentWillUpdate?(nextProps: Readonly<{
alt?: string;
className?: string;
size: T extends T ? T[number] : never;
width?: number;
height?: number;
}>, nextState: Readonly<{}>, nextContext: any): void;

@@ -144,0 +175,0 @@ };

{
"name": "@dynamic-labs/iconic",
"version": "0.0.1",
"version": "0.0.2",
"description": "A library of icons used by Dynamic Lab's SDK, served via CDN",
"main": "src/index.js",
"main": "dist/src/index.js",
"scripts": {
"build": "rimraf dist build && tsc && ts-node ./scripts/build-icons.ts",
"build": "rimraf dist build && tsc",
"test": "jest",

@@ -30,3 +30,3 @@ "lint": "eslint .",

"@types/react": "^18.0.27",
"@types/sharp": "^0.31.1",
"@types/svgo": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^5.0.0",

@@ -41,3 +41,2 @@ "eslint": "^8.0.1",

"eslint-plugin-react": "^7.32.2",
"fs-extra": "^11.1.0",
"jest": "^29.4.2",

@@ -49,3 +48,3 @@ "jest-environment-jsdom": "^29.4.2",

"rimraf": "^4.1.2",
"sharp": "^0.31.3",
"svgo": "^3.0.2",
"ts-jest": "^29.0.5",

@@ -59,5 +58,4 @@ "ts-node": "^10.9.1",

"exports": {
".": "./dist/index.js",
"./package.json": "./package.json",
"./icons/*": "./src/icons/*.js"
".": "./dist/src/index.js",
"./package.json": "./package.json"
},

@@ -64,0 +62,0 @@ "files": [

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