import {Box, Stack, Text} from '@sanity/ui' import {PreviewProps} from 'sanity' import {styled} from 'styled-components' const StyledText = styled(Text)` code { background-color: transparent; color: inherit; } ` export function APIPropertySignaturePreview(props: PreviewProps): React.ReactNode { const {name, isOptional, type} = props as any return ( {name} {isOptional ? '?' : ''}: {type?.map((t: any) => t.text).join('')} Property signature ) }