Skip to content

Commit

Permalink
fix: Clone styling for Questions with data variables or tags (#4017)
Browse files Browse the repository at this point in the history
  • Loading branch information
DafyddLlyr authored Nov 28, 2024
1 parent 7a523e9 commit bcf0e47
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import ErrorIcon from "@mui/icons-material/Error";
import Box from "@mui/material/Box";
import {
ComponentType as TYPES,
NodeTags,
Expand Down Expand Up @@ -76,25 +77,27 @@ const Question: React.FC<Props> = React.memo((props) => {
},
)}
>
<Link
href={href}
prefetch={false}
onContextMenu={handleContext}
ref={drag}
>
{props.data?.img && (
<Thumbnail
imageSource={props.data?.img}
imageAltText={props.data?.text}
/>
<Box>
<Link
href={href}
prefetch={false}
onContextMenu={handleContext}
ref={drag}
>
{props.data?.img && (
<Thumbnail
imageSource={props.data?.img}
imageAltText={props.data?.text}
/>
)}
{Icon && <Icon titleAccess={iconTitleAccess} />}
<span>{props.text}</span>
</Link>
{props.type !== TYPES.SetValue && props.data?.fn && (
<DataField value={props.data.fn} variant="parent" />
)}
{Icon && <Icon titleAccess={iconTitleAccess} />}
<span>{props.text}</span>
</Link>
{props.type !== TYPES.SetValue && props.data?.fn && (
<DataField value={props.data.fn} variant="parent" />
)}
{props.tags?.map((tag) => <Tag tag={tag} key={tag} />)}
{props.tags?.map((tag) => <Tag tag={tag} key={tag} />)}
</Box>
<ol className="options">
{childNodes.map((child: any) => (
<Node key={child.id} {...child} />
Expand Down
3 changes: 1 addition & 2 deletions editor.planx.uk/src/pages/FlowEditor/floweditor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ $fontMonospace: "Source Code Pro", monospace;
outline-offset: 0;
}

&.isClone > div,
&.isClone > a {
&.isClone > div {
margin-top: 3px;
position: relative;
::before {
Expand Down

0 comments on commit bcf0e47

Please sign in to comment.