updated elements wrapper styles
This commit is contained in:
parent
f839e6c562
commit
d3644125db
@ -2846,13 +2846,20 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => {
|
|||||||
Boolean(element.iconUrl) &&
|
Boolean(element.iconUrl) &&
|
||||||
(element.type === 'navigation_next' ||
|
(element.type === 'navigation_next' ||
|
||||||
element.type === 'navigation_prev');
|
element.type === 'navigation_prev');
|
||||||
|
const hasTransparentBackground =
|
||||||
|
element.type === 'description' &&
|
||||||
|
!element.iconUrl &&
|
||||||
|
(!element.descriptionBackgroundColor ||
|
||||||
|
element.descriptionBackgroundColor === 'transparent');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
key={element.id}
|
key={element.id}
|
||||||
type='button'
|
type='button'
|
||||||
data-constructor-element-id={element.id}
|
data-constructor-element-id={element.id}
|
||||||
className={`absolute border rounded text-xs font-semibold shadow text-left ${
|
className={`absolute rounded text-xs font-semibold text-left ${
|
||||||
|
hasTransparentBackground ? '' : 'border shadow'
|
||||||
|
} ${
|
||||||
hasIconDrivenSize ? 'overflow-hidden p-0 leading-none' : 'px-3 py-2'
|
hasIconDrivenSize ? 'overflow-hidden p-0 leading-none' : 'px-3 py-2'
|
||||||
} ${
|
} ${
|
||||||
isNavigationIconElement ? 'flex items-center justify-center' : ''
|
isNavigationIconElement ? 'flex items-center justify-center' : ''
|
||||||
@ -2860,8 +2867,10 @@ const ConstructorPage = ({ mode = 'constructor' }: ConstructorPageProps) => {
|
|||||||
isConstructorEditMode ? 'cursor-move' : 'cursor-pointer'
|
isConstructorEditMode ? 'cursor-move' : 'cursor-pointer'
|
||||||
} ${
|
} ${
|
||||||
selectedElementId === element.id
|
selectedElementId === element.id
|
||||||
? 'border-blue-500 bg-blue-50'
|
? 'border-blue-500 bg-blue-50 border shadow'
|
||||||
: 'border-blue-200 bg-white/95'
|
: hasTransparentBackground
|
||||||
|
? 'bg-transparent'
|
||||||
|
: 'border-blue-200 bg-white/95'
|
||||||
}`}
|
}`}
|
||||||
style={{
|
style={{
|
||||||
...buildCanvasElementStyle(element),
|
...buildCanvasElementStyle(element),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user