Skip to content

Commit 317f617

Browse files
committed
Updated apphelper to fix dnd
1 parent 08b00ba commit 317f617

5 files changed

Lines changed: 21 additions & 3784 deletions

File tree

package-lock.json

Lines changed: 18 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"@churchapps/apphelper-forms": "^0.6.14",
1010
"@churchapps/apphelper-login": "^0.6.15",
1111
"@churchapps/apphelper-markdown": "^0.6.14",
12-
"@churchapps/apphelper-website": "^0.6.14",
12+
"@churchapps/apphelper-website": "^0.6.15",
1313
"@churchapps/content-provider-helper": "^0.0.5",
1414
"@churchapps/helpers": "^1.2.22",
1515
"@mui/icons-material": "^7.1.2",

src/site/admin/Section.tsx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ interface Props {
2727

2828
export const Section: React.FC<Props> = props => {
2929
const [isDragging, setIsDragging] = useState(false);
30-
const [isHovered, setIsHovered] = useState(false);
3130

3231

3332
// Helper function to find element by ID in the nested structure
@@ -198,10 +197,7 @@ export const Section: React.FC<Props> = props => {
198197
if (props.section.textColor?.startsWith("var(")) result.color = props.section.textColor;
199198
if (props.onEdit) {
200199
result.minHeight = 100;
201-
result.boxShadow = isHovered
202-
? "0 4px 16px rgba(0, 0, 0, 0.12)"
203-
: "0 2px 8px rgba(0, 0, 0, 0.08)";
204-
result.transition = "box-shadow 0.2s ease";
200+
result.boxShadow = "0 2px 8px rgba(0, 0, 0, 0.08)";
205201
}
206202

207203
result = { ...result };
@@ -343,10 +339,7 @@ export const Section: React.FC<Props> = props => {
343339

344340
if (props.onEdit) {
345341
return (
346-
<div
347-
onMouseEnter={() => setIsHovered(true)}
348-
onMouseLeave={() => setIsHovered(false)}
349-
>
342+
<div>
350343
<DraggableWrapper dndType="section" elementType="section" data={props.section} onDoubleClick={(e: React.MouseEvent) => { const target = e.target as HTMLElement; if (!target.closest('.elementWrapper')) { props.onEdit(props.section, null); } }}>
351344
{result}
352345
</DraggableWrapper>

src/ui/Test.tsx

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)