import React from 'react' import { ValueInput, ValueInputProps } from '../ValueInput' import { Label, Row } from '../UI' import { useInputContext } from '../../context' import type { StringProps } from './string-types' import { styled } from '../../styles' type BaseStringProps = Pick & Omit & { editable?: boolean } const NonEditableString = styled('div', { whiteSpace: 'pre-wrap', }) export function String({ displayValue, onUpdate, onChange, editable = true, ...props }: BaseStringProps) { if (editable) return return {displayValue} } export function StringComponent() { const { label, settings, displayValue, onUpdate, onChange } = useInputContext() return ( ) }