UNPKG

@rainbow-me/rainbowkit

Version:
67 lines (64 loc) 1.66 kB
"use client"; import { Text } from "./chunk-32RBZPUM.js"; import { touchableStyles } from "./chunk-2W63IDAD.js"; import { isMobile } from "./chunk-N6EWR2LO.js"; import { Box } from "./chunk-ZKEPQLOV.js"; // src/components/ProfileDetails/ProfileDetailsAction.tsx import React from "react"; function ProfileDetailsAction({ action, icon, label, testId, url }) { const mobile = isMobile(); return /* @__PURE__ */ React.createElement( Box, { ...url ? { as: "a", href: url, rel: "noreferrer noopener", target: "_blank" } : { as: "button", type: "button" }, background: { base: "profileAction", ...!mobile ? { hover: "profileActionHover" } : {} }, borderRadius: "menuButton", boxShadow: "profileDetailsAction", className: touchableStyles({ active: "shrinkSm", hover: !mobile ? "grow" : void 0 }), display: "flex", onClick: action, padding: mobile ? "6" : "8", style: { willChange: "transform" }, testId, transition: "default", width: "full" }, /* @__PURE__ */ React.createElement( Box, { alignItems: "center", display: "flex", flexDirection: "column", gap: "1", justifyContent: "center", paddingTop: "2", width: "full" }, /* @__PURE__ */ React.createElement(Box, { color: "modalText", height: "max" }, icon), /* @__PURE__ */ React.createElement(Box, null, /* @__PURE__ */ React.createElement(Text, { color: "modalText", size: mobile ? "12" : "13", weight: "semibold" }, label)) ) ); } export { ProfileDetailsAction };