import React from 'react';
import cliReferenceData from '../_data/cli-reference.json';
import { Components } from '@components/mdx/mdx-components';
import { Grid, Box, color } from '@stacks/ui';
import { border, onlyText, slugify } from '@common/utils';
import hydrate from 'next-mdx-remote/hydrate';
const styles = {
maxWidth: '100%',
overflowX: 'auto',
overflowY: 'hidden',
whiteSpace: 'pre',
display: 'inline-block',
};
const cleanTheChildren = (children: any) => {
const text = onlyText(children).trim();
if (text.startsWith('$')) {
return text.replace('$', '');
}
return text;
};
const InlineCode = ({ children, ...rest }: any) => (
{cleanTheChildren(children)}
);
const ReferenceEntry = ({ entry, usage }) => (
{entry.command}
Group: {entry.group}
{hydrate(usage, {
components: {
...Components,
p: (props: any) => (
),
},
})}
Arguments
Name
Type
Value
Format
{entry.args.map((arg, index) => {
const { name, type, value, format } = arg;
return (
${name}
${type}
${value}
${format}
);
})}
);
export const CLIReferenceTable = ({ mdx }) =>
cliReferenceData.map((entry, index) => );