import {createMemo, For} from 'solid-js'; import {parseMarkdown} from '../../markdown'; import { getLayerStyle } from './hooks/dimensions'; import type { CardData } from './types'; import {DeckStore} from "./hooks/deckStore"; import {processVariables} from "../utils/csv-loader"; import {resolvePath} from "../utils/path"; export interface CardLayerProps { cardData: CardData; store: DeckStore; } export function CardLayer(props: CardLayerProps) { const layers = createMemo(() => props.store.state.layerConfigs.filter((l) => l.visible)); const dimensions = () => props.store.state.dimensions!; const showBounds = () => props.store.state.isEditing; function renderLayerContent(content: string) { const iconPath = resolvePath(props.store.state.cards.sourcePath, props.cardData.iconPath); return parseMarkdown(processVariables(content, props.cardData, props.store.state.cards), iconPath) as string; } return ( {(layer) => { return ( <>
{showBounds() && (
)} ); }} ); }