feat(fs.lab): LabDraft component
This commit is contained in:
parent
83ee572a36
commit
82c4242088
11 changed files with 443 additions and 0 deletions
|
@ -0,0 +1,17 @@
|
|||
import TextOnPath from '../text-on-path'
|
||||
import { getProps } from '../utils'
|
||||
|
||||
const Path = (props) => {
|
||||
if (!props.path.render) return null
|
||||
const output = []
|
||||
const pathId = 'path-' + props.part + '-' + props.name
|
||||
output.push(
|
||||
<path id={pathId} key={pathId} d={props.path.asPathstring()} {...getProps(props.path)} />
|
||||
)
|
||||
if (props.path.attributes.get('data-text'))
|
||||
output.push(<TextOnPath key={'text-on-path-' + props.name} pathId={pathId} {...props} />)
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
export default Path
|
Loading…
Add table
Add a link
Reference in a new issue