import * as React from 'react'; // @ts-ignore import dynamicReact from '@markdoc/markdoc/dist/react'; import { usePageSharedData } from '@portal/hooks'; import { Link } from '@portal/Link'; import { idify } from '../helpers'; export {default as XRPLoader} from '../components/XRPLoader'; export function IndexPageItems() { const data = usePageSharedData('index-page-items') as any[]; return (
); } export function InteractiveBlock(props: { children: React.ReactNode; label: string; steps: string[] }) { const stepId = idify(props.label); return (
    {props.steps?.map((step, idx) => { const iterStepId = idify(step).toLowerCase(); let className = `breadcrumb-item bc-${iterStepId}`; if (idx > 0) className += ' disabled'; if (iterStepId === stepId) className += ' current'; return (
  • {step}
  • ); })}
{dynamicReact(props.children, React, {})}
); } export function RepoLink(props: { children: React.ReactNode; path: string; github_fork: string; github_branch: string }) { const treeblob = props.path.indexOf(".") >= 0 ? "blob/" : "tree/" const sep = props.github_fork[-1] == "/" ? "" : "/" const href = props.github_fork+sep+treeblob+props.github_branch+"/"+props.path return ( {dynamicReact(props.children, React, {})} ) } export function CodePageName(props: { name: string; }) { return ( {props.name} ) }