/* eslint-disable react-native/no-inline-styles */ import { Stack, useSpacing } from '@mobily/stacks'; import React, { useState } from 'react'; import { ScrollView } from 'react-native-gesture-handler'; import UIHtmlDisplayMolecule from './UIHtmlDisplayMolecule'; import UISourceDisplayMolecule from './UISourceDisplayMolecule'; import BoxNucleon from './nucleons/BoxNucleon'; import IconNucleon, { IconNucleonProps } from './nucleons/IconNucleon'; import { useColorRoles } from '../theme/colorSystem'; import { useNuclearContentWidth } from './nucleons/useContentWidthContext'; import { PropsWithStyle } from './nucleons/types'; import { RenderHTMLProps, HTMLSourceInline } from 'react-native-render-html'; import { TouchableWithoutFeedbackProps } from 'react-native'; import GestureHandlerAdapterNucleon from './nucleons/GestureHandlerAdapterNucleon'; import { Card, TouchableRipple } from 'react-native-paper'; import DefaultColorRolesProvider from './croles/DefaultColorRolesProvider'; import UICardContainer from './UICardContainer'; function UIIconButton({ onPress, iconName, selected, ...other }: { iconName: IconNucleonProps['name']; onPress?: TouchableWithoutFeedbackProps['onPress']; selected: boolean; }) { const { selectable } = useColorRoles(); const space1 = useSpacing(1); return ( ); } interface RenderHtmlCardOrganismProps { caption?: string; preferHtmlSrc: boolean; props: RenderHTMLProps; snapshot: string; snippet: string; title: string; } function RenderHTMLCardInner({ props: renderHtmlProps, snippet, preferHtmlSrc, snapshot }: Omit< PropsWithStyle, 'style' | 'title' | 'caption' >) { const [selectedSourceType, setSelectedSourceType] = useState< 'html' | 'jsx' | 'trt' >(preferHtmlSrc ? 'html' : 'jsx'); const { surface } = useColorRoles(); const contentWidth = useNuclearContentWidth(); const sourceDisplayStyle = { minWidth: contentWidth, backgroundColor: 'transparent' }; const cardBg = surface.background; return ( <> setSelectedSourceType('jsx')} iconName="language-javascript" /> setSelectedSourceType('html')} iconName="language-html5" /> setSelectedSourceType('trt')} iconName="file-tree" /> {selectedSourceType === 'html' ? ( ) : selectedSourceType === 'jsx' ? ( ) : ( )} ); } export default function RenderHtmlCardOrganism({ caption, title, style, ...props }: PropsWithStyle) { return ( ); }