feat(lab): Paperless and render settings
This commit is contained in:
parent
21d1d15e53
commit
18f9e93cc0
9 changed files with 269 additions and 55 deletions
|
@ -2,11 +2,17 @@ import React, { useState } from 'react'
|
|||
import Svg from './svg'
|
||||
import Defs from './defs'
|
||||
import Part from './part'
|
||||
import theme from 'pkgs/plugin-theme/src/index.js'
|
||||
|
||||
const LabDraft = ({ app, pattern, gist, updateGist }) => {
|
||||
|
||||
const patternInstance = new pattern(gist).draft()
|
||||
const patternProps = patternInstance.getRenderProps()
|
||||
const patternInstance = new pattern(gist)
|
||||
if (gist?.renderer === 'svg') return <div
|
||||
dangerouslySetInnerHTML={{ __html: patternInstance.use(theme).draft().render()}} />
|
||||
|
||||
const patternProps = patternInstance.draft().getRenderProps()
|
||||
console.log(patternProps)
|
||||
|
||||
|
||||
return (
|
||||
<Svg {...patternProps}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue