import React from 'react';
import CodeSnippet from './CodeSnippet';
import { jsonStringify } from '../../util';
type Props = {
className?: string;
style?: React.CSSProperties;
children?: React.ReactNode | React.ReactNodeArray;
};
export default function UnorderedList({ children, className = '', ...props }: Props) {
return (
<>
{children && (
)}
>
);
}
UnorderedList.Item = UnorderedListItem;
type Value = string | React.ReactNode | Array | Object;
type UnorderedListItemProps = {
value?: Value;
};
function UnorderedListItem({ value = '' }: UnorderedListItemProps) {
let valueOutput = value;
if (React.isValidElement(value)) {
valueOutput = value;
} else if (typeof value === 'object') {
valueOutput = ;
} else if (typeof value === 'string') {
valueOutput = ;
}
return {valueOutput as React.ReactNode};
}