Skip to content

Commit

Permalink
DST-450: use ghost button for demo links
Browse files Browse the repository at this point in the history
  • Loading branch information
aromko committed May 27, 2024
1 parent d077bd4 commit e3ffc28
Show file tree
Hide file tree
Showing 3 changed files with 144 additions and 6 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"dependencies": {
"@code-hike/mdx": "^0.9.0",
"@marigold/components": "^7.7.1",
"@marigold/icons": "^1.2.49",
"@marigold/theme-core": "^26.1.7",
"@mdx-js/rollup": "^3.0.1",
"@tanstack/react-query": "^5.35.1",
Expand Down
126 changes: 126 additions & 0 deletions pnpm-lock.yaml

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

23 changes: 17 additions & 6 deletions src/components/DemoLink.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
import {Link} from '@tanstack/react-router';
import { Link } from '@tanstack/react-router';
import { ExternalLink } from '@marigold/icons';
import { Button } from '@marigold/components';

const DemoLink = ({ destination, text = 'View demo'}: {destination: string, text?: string}) => {
const DemoLink = ({
destination,
text = 'View demo',
}: {
destination: string;
text?: string;
}) => {
return (
<div className="pb-2">
<div className="w-fit">
<Link target="_blank" to={destination} search="">
{text}
<Button className="flex-1 cursor-pointer rounded-md bg-white p-4 font-black text-gray-800 hover:bg-gray-300">
{text}
<ExternalLink size={20} />
</Button>
</Link>
</div>
);
}
};

export default DemoLink;
export default DemoLink;

0 comments on commit e3ffc28

Please sign in to comment.