Make sure basic solidity types are colored orange

This commit is contained in:
Fabio Berger
2018-09-27 19:49:07 +01:00
parent a6672e0190
commit cfddea931d

View File

@@ -13,6 +13,7 @@ import { Signature } from './signature';
import { TypeDefinition } from './type_definition';
const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean'];
const basicSolidityTypes = ['bytes', 'bytes4', 'uint256', 'address'];
const defaultProps = {};
@@ -80,7 +81,7 @@ export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
case TypeDocTypes.Array:
typeName = type.elementType.name;
if (_.includes(basicJsTypes, typeName)) {
if (_.includes(basicJsTypes, typeName) || _.includes(basicSolidityTypes, typeName)) {
typeNameColor = colors.orange;
}
break;