@babylonlabs-io/core-ui 1.20.0 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Icons/common/WarningIcon.d.ts +2 -0
- package/dist/components/Icons/common/WarningIcon.js +8 -0
- package/dist/components/Icons/index.d.ts +1 -0
- package/dist/components/Icons/index.js +1 -0
- package/dist/components/Warning/Warning.d.ts +3 -1
- package/dist/components/Warning/Warning.js +3 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +735 -703
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { iconColorVariants } from "../index";
|
|
3
|
+
import { twJoin } from "tailwind-merge";
|
|
4
|
+
export const WarningIcon = ({ className = "", size = 22, variant = "default", color }) => {
|
|
5
|
+
const colorClass = color || iconColorVariants[variant];
|
|
6
|
+
const ASPECT_RATIO = 22 / 20;
|
|
7
|
+
return (_jsx("svg", { style: { width: size, height: size * ASPECT_RATIO }, viewBox: "0 0 22 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: twJoin("transition-opacity duration-200", colorClass, className), children: _jsx("path", { d: "M0 19.5H22L11 0.5L0 19.5ZM12 16.5H10V14.5H12V16.5ZM12 12.5H10V8.5H12V12.5Z", fill: "currentColor" }) }));
|
|
8
|
+
};
|
|
@@ -21,3 +21,4 @@ export { LinkWalletIcon } from "./wallet/LinkWalletIcon";
|
|
|
21
21
|
export { UsingInscriptionIcon } from "./wallet/UsingInscriptionIcon";
|
|
22
22
|
export { CopyIcon } from "./common/CopyIcon";
|
|
23
23
|
export { CloseIcon } from "./common/CloseIcon";
|
|
24
|
+
export { WarningIcon } from "./common/WarningIcon";
|
|
@@ -2,5 +2,7 @@ import { type PropsWithChildren } from "react";
|
|
|
2
2
|
import "./Warning.css";
|
|
3
3
|
export interface WarningProps extends PropsWithChildren {
|
|
4
4
|
className?: string;
|
|
5
|
+
iconClassName?: string;
|
|
6
|
+
messageClassName?: string;
|
|
5
7
|
}
|
|
6
|
-
export declare function Warning({ children, className }: WarningProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function Warning({ children, className, iconClassName, messageClassName }: WarningProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { twJoin } from "tailwind-merge";
|
|
3
|
+
import { WarningIcon } from "../Icons";
|
|
3
4
|
import "./Warning.css";
|
|
4
|
-
export function Warning({ children, className }) {
|
|
5
|
-
return (_jsxs("div", { className: twJoin("bbn-warning", className), children: [_jsx(
|
|
5
|
+
export function Warning({ children, className, iconClassName, messageClassName }) {
|
|
6
|
+
return (_jsxs("div", { className: twJoin("bbn-warning", className), children: [_jsx(WarningIcon, { variant: "secondary", size: 22, className: twJoin("bbn-warning-icon", iconClassName) }), _jsx("p", { className: twJoin("bbn-warning-message", messageClassName), children: children })] }));
|
|
6
7
|
}
|