import * as React from 'react'; import { useLocation } from 'react-router-dom'; // @ts-ignore import dynamicReact from '@markdoc/markdoc/dist/react'; import { Link } from '@redocly/theme/components/Link/Link'; import { useThemeHooks } from '@redocly/theme/core/hooks' import { idify } from '../helpers'; import { Button } from '@redocly/theme/components/Button/Button'; export {default as XRPLoader} from '../components/XRPLoader'; export { XRPLCard, CardGrid } from '../components/XRPLCard'; export function IndexPageItems() { const { usePageSharedData } = useThemeHooks(); const data = usePageSharedData('index-page-items') as any[]; return (
{item.blurb}
{props.name}
)
}
export function Badge(props: {
children: React.ReactNode;
color: string;
href: string;
}) {
const DEFAULT_COLORS = {
"open for voting": "80d0e0",
"投票中": "80d0e0", // ja: open for voting
"expected": "blue",
"予定": "blue", // ja: expected
"enabled": "green",
"有効": "green", // ja: enabled
"obsolete": "red",
"廃止": "red", // ja: obsolete
"撤回": "red", // ja: withdrawn/removed/vetoed
"new in": "blue",
"新規": "blue", // ja: new in
"updated in": "blue",
"更新": "blue", // ja: updated in
"in development": "lightgrey",
"開発中": "lightgrey", // ja: in development
}
let childstrings = ""
React.Children.forEach(props.children, (child, index) => {
if (typeof child == "string") {
childstrings += child
}
});
const parts = childstrings.split(":")
const left : string = shieldsIoEscape(parts[0])
const right : string = shieldsIoEscape(parts.slice(1).join(":"))
let color = props.color
if (!color) {
if (DEFAULT_COLORS.hasOwnProperty(left.toLowerCase())) {
color = DEFAULT_COLORS[left.toLowerCase()]
} else {
color = "lightgrey"
}
}
let badge_url = `https://img.shields.io/badge/${left}-${right}-${color}.svg`
if (props.href) {
return (
| {translate("amendment.table.name", "Name")} | {translate("amendment.table.introduced", "Introduced")} | {translate("amendment.table.status", "Status")} |
|---|---|---|
| {amendment.name} | {amendment.rippled_version} |
|