Files
xrpl-dev-portal/@theme/components/XRPLCard.tsx
Calvin Jhunjhuwala a565ceb59d Merge master into xrpl-brand-update-2026
Resolve all merge conflicts:
- package.json: keep Bootstrap 5 + modern build toolchain
- package-lock.json: accept branch version
- .gitignore: keep both sides (css.map + go/java ignores)
- .claude/settings.json, Navbar.tsx, events.page.tsx,
  community/index.page.tsx, xrp-faucets.page.tsx: resolved
- styles/xrpl.scss: keep shared component imports
- static/css/devportal2024-v1.css: regenerated from SCSS
- Fix undefined $blue-purple-600 → $blue-purple-500 in
  _tutorials.scss and light/_light-theme.scss
- styles/_feedback.scss: auto-merged

Co-Authored-By: Oz <oz-agent@warp.dev>
2026-05-14 10:12:16 -07:00

43 lines
1.3 KiB
TypeScript

// Components for creating grids of cards in the current site style.
// Used in both custom .page.tsx files as well as markdoc tags {% card-grid %}
// and {% xrpl-card %}.
import * as React from 'react';
import dynamicReact from '@markdoc/markdoc/dist/react';
import { Link } from '@redocly/theme/components/Link/Link';
export interface XRPLCardProps {
title: string,
href: string,
body?: string,
image?: string,
imageAlt?: string,
external: boolean,
}
export function XRPLCard(props: XRPLCardProps) {
return (
<Link className="card float-up-on-hover" to={props.href} >
<div className="card-body">
{ props.image && (
<div className="card-icon-container">
<img src={props.image} alt={props.imageAlt} />
</div>
)}
<h4 className="card-title h5">{props.title}</h4>
{ props.body && (
<p className="card-text">{props.body}</p>
)}
</div>
{/* <div className="card-footer">&nbsp;</div> */}
</Link>
)
}
export function CardGrid(props) {
const gridClass = `card-grid card-grid-${props.layout}`
return (
<div id={props.id} className={gridClass}>{dynamicReact(props.children, React, {})}</div>
)
}