diff --git a/src/client/types/literal.type-renderer.jsx b/src/client/types/literal.type-renderer.jsx index f4eb3db..1cf8a44 100644 --- a/src/client/types/literal.type-renderer.jsx +++ b/src/client/types/literal.type-renderer.jsx @@ -1,3 +1,4 @@ +import {fromLiteral} from '@avocado/behavior'; import {compose} from '@avocado/core'; import contempo from 'contempo'; import React from 'react'; @@ -15,11 +16,12 @@ const Literal = ({ context, onChange = () => {}, type, - value, + value: {value}, }) => { const typeRenderers = useTypeRenderers(); - const Component = typeRenderers[type]; - const [options] = opsOptions(context, [], type); + const actualType = 'any' === type ? fromLiteral(value) : type; + const Component = typeRenderers[actualType]; + const [options] = opsOptions(context, [], actualType); options.push(''); return (
@@ -40,7 +42,7 @@ const Literal = ({ .map((option) => ) } - {Component ? : null} + {Component ? : null}
); };