Skip to content

Commit

Permalink
Remove link from popovers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevintjuhz committed Nov 26, 2024
1 parent 4d56b25 commit 83d1463
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 53 deletions.
7 changes: 0 additions & 7 deletions dist/components.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components.css.map

Large diffs are not rendered by default.

23 changes: 6 additions & 17 deletions dist/components.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/components.js.map

Large diffs are not rendered by default.

19 changes: 4 additions & 15 deletions dist/components.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,15 @@ import { FaCaretDown } from "react-icons/fa6";
import { Popover, PopoverButton, PopoverPanel } from "@headlessui/react";
import { FaInfoCircle } from "react-icons/fa";
import React3 from "react";
import { FaArrowUpRightFromSquare } from "react-icons/fa6";
function InfoPopover({ title, text, link }) {
function InfoPopover({ title, text }) {
return /* @__PURE__ */ React3.createElement(Popover, null, /* @__PURE__ */ React3.createElement(PopoverButton, { className: "prp-ring-0 focus:prp-ring-0 prp-font-bold prp-text-indigo-300 prp-text-xs hover:prp-text-indigo-400 prp-block" }, /* @__PURE__ */ React3.createElement(FaInfoCircle, null)), /* @__PURE__ */ React3.createElement(
PopoverPanel,
{
transition: true,
anchor: "bottom",
className: "prp-z-[1000] prp-p-4"
},
/* @__PURE__ */ React3.createElement("div", { className: " prp-bg-white rounded-lg p-6 prp-dropshadow-popover prp-space-y-3 prp-max-w-[312px]" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-base prp-font-bold prp-leading-tight prp-text-gray-900" }, title), /* @__PURE__ */ React3.createElement("div", { className: "prp-space-y-2" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-sm" }, text), /* @__PURE__ */ React3.createElement(
"a",
{
href: link,
className: "prp-font-black prp-text-sm prp-flex prp-gap-1 prp-items-center prp-text-indigo-700"
},
"Learn more ",
/* @__PURE__ */ React3.createElement(FaArrowUpRightFromSquare, null)
)))
/* @__PURE__ */ React3.createElement("div", { className: " prp-bg-white rounded-lg p-6 prp-dropshadow-popover prp-space-y-3 prp-max-w-[312px]" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-base prp-font-bold prp-leading-tight prp-text-gray-900" }, title), /* @__PURE__ */ React3.createElement("div", { className: "prp-space-y-2" }, /* @__PURE__ */ React3.createElement("span", { className: "prp-text-sm" }, text)))
));
}

Expand Down Expand Up @@ -178,8 +169,7 @@ function PreprPreviewBar(props) {
InfoPopover,
{
title: "Adaptive Preview",
text: "Choose a segment to see how it's displayed.",
link: "Learn more"
text: "Choose a segment to see how it's displayed."
}
)), /* @__PURE__ */ React4.createElement(
Listbox,
Expand Down Expand Up @@ -208,8 +198,7 @@ function PreprPreviewBar(props) {
InfoPopover,
{
title: "A/B Testing",
text: "Choose between two different versions of a page to see which one performs better.",
link: "Learn more"
text: "Choose between two different versions of a page to see which one performs better."
}
)), /* @__PURE__ */ React4.createElement(
RadioGroup,
Expand Down
2 changes: 1 addition & 1 deletion dist/components.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@preprio/prepr-nextjs",
"version": "1.0.0-beta.13",
"version": "1.0.0-beta.14",
"description": "A next.js package with code snippets to use with Prepr",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand Down
9 changes: 1 addition & 8 deletions src/components/InfoPopover.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import { FaArrowUpRightFromSquare } from 'react-icons/fa6'
interface InfoPopoverProps {
title: string
text: string
link: string
}

export default function InfoPopover({ title, text, link }: InfoPopoverProps) {
export default function InfoPopover({ title, text }: InfoPopoverProps) {
return (
<Popover>
<PopoverButton className="prp-ring-0 focus:prp-ring-0 prp-font-bold prp-text-indigo-300 prp-text-xs hover:prp-text-indigo-400 prp-block">
Expand All @@ -26,12 +25,6 @@ export default function InfoPopover({ title, text, link }: InfoPopoverProps) {
</span>
<div className="prp-space-y-2">
<span className="prp-text-sm">{text}</span>
<a
href={link}
className="prp-font-black prp-text-sm prp-flex prp-gap-1 prp-items-center prp-text-indigo-700"
>
Learn more <FaArrowUpRightFromSquare />
</a>
</div>
</div>
</PopoverPanel>
Expand Down
2 changes: 0 additions & 2 deletions src/components/PreprPreviewBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export function PreprPreviewBar(props: {
text={
"Choose a segment to see how it's displayed."
}
link={'Learn more'}
/>
</div>
<Listbox
Expand Down Expand Up @@ -166,7 +165,6 @@ export function PreprPreviewBar(props: {
text={
'Choose between two different versions of a page to see which one performs better.'
}
link={'Learn more'}
/>
</div>

Expand Down

0 comments on commit 83d1463

Please sign in to comment.