Skip to content

Commit 3eed8b1

Browse files
authored
fix(ui): relationship field "add new" button styling (#7814)
1 parent 404008d commit 3eed8b1

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

packages/ui/src/elements/AddNewRelation/index.scss

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,23 @@
1010
height: 100%;
1111
}
1212

13-
&__add-button {
13+
&__add-button:not(.relationship-add-new__add-button--unstyled),
14+
&__add-button:not(.relationship-add-new__add-button--unstyled).doc-drawer__toggler {
15+
@include formInput;
16+
margin: 0;
17+
border-top-left-radius: 0;
18+
border-bottom-left-radius: 0;
1419
position: relative;
20+
height: 100%;
21+
margin-left: -1px;
22+
display: flex;
23+
padding: 0 base(0.5);
24+
align-items: center;
25+
display: flex;
26+
cursor: pointer;
1527
}
1628

17-
&__add-button--unstyled,
18-
&__add-button--unstyled.doc-drawer__toggler {
19-
@include formInput;
29+
&__add-button {
2030
margin: 0;
2131
border-top-left-radius: 0;
2232
border-bottom-left-radius: 0;

packages/ui/src/elements/AddNewRelation/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ export const AddNewRelation: React.FC<Props> = ({
142142
<DocumentDrawerToggler
143143
className={[
144144
`${baseClass}__add-button`,
145-
!unstyled && `${baseClass}__add-button--styled`,
146-
].join(' ')}
145+
unstyled && `${baseClass}__add-button--unstyled`,
146+
]
147+
.filter(Boolean)
148+
.join(' ')}
147149
onClick={() => setShowTooltip(false)}
148150
onMouseEnter={() => setShowTooltip(true)}
149151
onMouseLeave={() => setShowTooltip(false)}

0 commit comments

Comments
 (0)