Add website to mono repo, update packages to align with existing sub-packages, use new subscribeAsync 0x.js method

This commit is contained in:
Fabio Berger
2017-11-21 14:03:08 -06:00
parent 037f466e1f
commit 3660ba28d7
292 changed files with 26118 additions and 100 deletions

View File

@@ -0,0 +1,26 @@
import * as _ from 'lodash';
import * as React from 'react';
import {utils} from 'ts/utils/utils';
import {TypeDocNode, EnumValue} from 'ts/types';
const STRING_ENUM_CODE_PREFIX = ' strEnum(';
interface EnumProps {
values: EnumValue[];
}
export function Enum(props: EnumProps) {
const values = _.map(props.values, (value, i) => {
const isLast = i === props.values.length - 1;
const defaultValueIfAny = !_.isUndefined(value.defaultValue) ? ` = ${value.defaultValue}` : '';
return `\n\t${value.name}${defaultValueIfAny},`;
});
return (
<span>
{`{`}
{values}
<br />
{`}`}
</span>
);
}