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

@themindfulpug/core

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@themindfulpug/core - npm Package Compare versions

Comparing version 1.0.0-2 to 1.0.0

2

dist/components/Header/index.d.ts

@@ -11,3 +11,3 @@ import { EmotionJSX } from '@emotion/react/types/jsx-namespace';

*/
logo: EmotionJSX.Element | React.FC | string;
logo?: EmotionJSX.Element | React.FC | string;
/**

@@ -14,0 +14,0 @@ * A list of urls to be made into links

@@ -24,4 +24,7 @@ var __assign = (this && this.__assign) || function () {

import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
import { useState } from 'react';
import { CDN_URL } from '../../util/constants';
import { Image } from '../Image';
import { Link } from '../Link';
import { theme } from '../ThemeProvider';
var styles = {

@@ -51,2 +54,10 @@ default: {

},
linkOverride: {
fontWeight: 400,
color: theme.palette.text.primary
},
linkOverrideHover: {
fontWeight: 'bold',
color: theme.palette.text.primary
},
action: {

@@ -60,2 +71,6 @@ width: '100%',

padding: '0 10px'
},
underline: {
width: '15px',
borderTop: "2px solid " + theme.palette.primary.main
}

@@ -71,6 +86,8 @@ };

export var Header = function (_a) {
var logo = _a.logo, links = _a.links, action = _a.action, style = _a.style, props = __rest(_a, ["logo", "links", "action", "style"]);
var _b = _a.logo, logo = _b === void 0 ? CDN_URL + "/the-mindful-pug-logo-w-text.png" : _b, links = _a.links, action = _a.action, style = _a.style, props = __rest(_a, ["logo", "links", "action", "style"]);
var _c = useState(false), hovered = _c[0], setHovered = _c[1];
return (_jsxs("div", __assign({ css: setStyles }, props, { style: style }, { children: [_jsx("div", { children: typeof logo === 'string' ? (_jsx(Image, { src: logo, style: styles.logo }, void 0)) : (logo) }, void 0),
_jsx("div", __assign({ css: styles.links }, { children: links.map(function (l, i) { return (_jsx("div", __assign({ css: styles.link }, { children: _jsx(Link, { to: l.to, text: l.text }, void 0) }), i + l.text)); }) }), void 0),
_jsx("div", __assign({ css: styles.links }, { children: links.map(function (l, i) { return (_jsxs("div", __assign({ css: styles.link, onMouseEnter: function () { return setHovered(true); }, onMouseLeave: function () { return setHovered(false); } }, { children: [_jsx(Link, { to: l.to, text: l.text, style: hovered ? styles.linkOverrideHover : styles.linkOverride }, void 0),
hovered && _jsx("div", { style: styles.underline }, void 0)] }), i)); }) }), void 0),
_jsx("div", __assign({ css: styles.action }, { children: Array.isArray(action) ? (action.map(function (a, i) { return (_jsx("div", __assign({ css: styles.button }, { children: a }), i)); })) : (_jsx("div", __assign({ css: styles.button }, { children: action }), void 0)) }), void 0)] }), void 0));
};
{
"name": "@themindfulpug/core",
"version": "1.0.0-2",
"version": "1.0.0",
"author": "joshgreenwell",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN LICENSE.txt",

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