lint fixes
This commit is contained in:
parent
9109f631d3
commit
6f28c36c59
6 changed files with 37 additions and 29 deletions
|
@ -20,7 +20,17 @@ import { EditView, ns as editNs } from './views/edit/index.mjs'
|
|||
import { TestView, ns as testNs } from 'shared/components/workbench/views/test/index.mjs'
|
||||
import { ExportView, ns as exportNs } from 'shared/components/workbench/views/exporting/index.mjs'
|
||||
|
||||
export const ns = ['account', 'workbench', ...draftNs, ...saveNs, ...printNs, ...cutNs, ...testNs]
|
||||
export const ns = [
|
||||
'account',
|
||||
'workbench',
|
||||
...draftNs,
|
||||
...saveNs,
|
||||
...printNs,
|
||||
...cutNs,
|
||||
...editNs,
|
||||
...testNs,
|
||||
...exportNs,
|
||||
]
|
||||
|
||||
const defaultUi = {
|
||||
renderer: 'react',
|
||||
|
|
|
@ -18,7 +18,7 @@ const UiSetting = ({ name, control, ...rest }) => (
|
|||
/>
|
||||
)
|
||||
|
||||
export const UiSettings = ({ design, update, settings, ui, control, language, DynamicDocs }) => {
|
||||
export const UiSettings = ({ update, ui, control, language, DynamicDocs }) => {
|
||||
const settingsConfig = loadSettingsConfig(ui)
|
||||
|
||||
return (
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
// Dependencies
|
||||
import { forwardRef, useContext } from 'react'
|
||||
import { forwardRef } from 'react'
|
||||
// Hooks
|
||||
import { useTranslation } from 'next-i18next'
|
||||
// Context
|
||||
import { ModalContext } from 'shared/context/modal-context.mjs'
|
||||
// Components
|
||||
import { SizeMe } from 'react-sizeme'
|
||||
import { TransformWrapper, TransformComponent } from 'react-zoom-pan-pinch'
|
||||
|
@ -32,22 +31,12 @@ export const ns = ['workbench']
|
|||
* Also still to see how this will work with SSR
|
||||
*/
|
||||
export const PanZoomPattern = forwardRef((props, ref) => {
|
||||
const { setModal } = useContext(ModalContext)
|
||||
const { t } = useTranslation(ns)
|
||||
|
||||
const { renderProps = false, components = {}, update, settings, ui } = props
|
||||
const { renderProps = false, components = {} } = props
|
||||
|
||||
if (!renderProps) return null
|
||||
|
||||
const showInfo = (evt, info = null) => {
|
||||
evt.stopPropagation()
|
||||
setModal(
|
||||
<ModalWrapper>
|
||||
<div className="max-w-prose">{info}</div>
|
||||
</ModalWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<SizeMe refreshRate={64}>
|
||||
{({ size }) => (
|
||||
|
@ -66,3 +55,5 @@ export const PanZoomPattern = forwardRef((props, ref) => {
|
|||
</SizeMe>
|
||||
)
|
||||
})
|
||||
|
||||
PanZoomPattern.displayName = 'PanZoomPattern'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue