kopia lustrzana https://github.com/Tldraw/Tldraw
some nit cleanup
rodzic
7ae03ca32b
commit
d4a162d1ad
|
@ -1,3 +1,4 @@
|
|||
import classNames from 'classnames'
|
||||
import * as React from 'react'
|
||||
|
||||
/** @public */
|
||||
|
@ -6,7 +7,7 @@ export type HTMLContainerProps = React.HTMLAttributes<HTMLDivElement>
|
|||
/** @public */
|
||||
export function HTMLContainer({ children, className = '', ...rest }: HTMLContainerProps) {
|
||||
return (
|
||||
<div {...rest} className={`tl-html-container ${className}`}>
|
||||
<div {...rest} className={classNames('tl-html-container', className)}>
|
||||
{children}
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import classNames from 'classnames'
|
||||
import * as React from 'react'
|
||||
|
||||
/** @public */
|
||||
|
@ -6,7 +7,7 @@ export type SVGContainerProps = React.HTMLAttributes<SVGElement>
|
|||
/** @public */
|
||||
export function SVGContainer({ children, className = '', ...rest }: SVGContainerProps) {
|
||||
return (
|
||||
<svg {...rest} className={`tl-svg-container ${className}`}>
|
||||
<svg {...rest} className={classNames('tl-svg-container', className)}>
|
||||
{children}
|
||||
</svg>
|
||||
)
|
||||
|
|
|
@ -110,18 +110,18 @@ export class FrameShapeUtil extends BaseBoxShapeUtil<TLFrameShape> {
|
|||
|
||||
let labelTranslate: string
|
||||
switch (labelSide) {
|
||||
case 0:
|
||||
case 0: // top
|
||||
labelTranslate = ``
|
||||
break
|
||||
case 3:
|
||||
case 3: // right
|
||||
labelTranslate = `translate(${toDomPrecision(shape.props.w)}, 0) rotate(90)`
|
||||
break
|
||||
case 2:
|
||||
case 2: // bottom
|
||||
labelTranslate = `translate(${toDomPrecision(shape.props.w)}, ${toDomPrecision(
|
||||
shape.props.h
|
||||
)}) rotate(180)`
|
||||
break
|
||||
case 1:
|
||||
case 1: // left
|
||||
labelTranslate = `translate(0, ${toDomPrecision(shape.props.h)}) rotate(270)`
|
||||
break
|
||||
default:
|
||||
|
|
Ładowanie…
Reference in New Issue