(value, field)
| 4 | import { WidgetPreviewContainer } from 'decap-cms-ui-default'; |
| 5 | |
| 6 | function toValue(value, field) { |
| 7 | if (isString(value)) { |
| 8 | return value; |
| 9 | } |
| 10 | if (Map.isMap(value)) { |
| 11 | return value.get(field.getIn(['keys', 'code'], 'code'), ''); |
| 12 | } |
| 13 | return ''; |
| 14 | } |
| 15 | |
| 16 | function CodePreview(props) { |
| 17 | return ( |