chore(components): Renamed Render to Draft
Note that this was already exported as Draft, and the Draft folder was a symlink to Render. Now it's just called Draft.
This commit is contained in:
parent
4833f1a4c0
commit
a833496e04
33 changed files with 415 additions and 475 deletions
31
packages/components/src/Draft/Defs/index.js
Normal file
31
packages/components/src/Draft/Defs/index.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
import React from 'react'
|
||||
import Markers from './Markers'
|
||||
import Snippets from './Snippets'
|
||||
import Grid from './Grid'
|
||||
|
||||
const Defs = (props) => {
|
||||
let paperlessGrids = null
|
||||
if (props.paperless) {
|
||||
paperlessGrids = []
|
||||
for (let p in props.parts) {
|
||||
let anchor = { x: 0, y: 0 }
|
||||
if (typeof props.parts[p].points.gridAnchor !== 'undefined')
|
||||
anchor = props.parts[p].points.gridAnchor
|
||||
else if (typeof props.parts[p].points.anchor !== 'undefined')
|
||||
anchor = props.parts[p].points.anchor
|
||||
paperlessGrids.push(
|
||||
<pattern id={'grid-' + p} key={'grid-' + p} xlinkHref="#grid" x={anchor.x} y={anchor.y} />
|
||||
)
|
||||
}
|
||||
}
|
||||
return (
|
||||
<defs>
|
||||
<Markers />
|
||||
<Snippets />
|
||||
<Grid units={props.units} />
|
||||
{paperlessGrids}
|
||||
</defs>
|
||||
)
|
||||
}
|
||||
|
||||
export default Defs
|
Loading…
Add table
Add a link
Reference in a new issue