Skip to content

Commit f2568a6

Browse files
committed
fix: cursor and editable behaviour.
1 parent ffd5862 commit f2568a6

File tree

1 file changed

+17
-3
lines changed
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes

1 file changed

+17
-3
lines changed

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/string.svelte

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,10 @@
130130

131131
{#if showEncrypt}
132132
<Layout.Stack gap="xs" direction="column">
133-
<div class="popover-holder" class:disabled-checkbox={!supportsStringEncryption || editing}>
133+
<div
134+
class="popover-holder"
135+
class:cursor-not-allowed={editing}
136+
class:disabled-checkbox={!supportsStringEncryption || editing}>
134137
<Layout.Stack inline gap="s" alignItems="flex-start" direction="row">
135138
<Popover let:toggle placement="bottom-start">
136139
<Selector.Checkbox
@@ -142,7 +145,9 @@
142145
<Layout.Stack gap="xxs" direction="column">
143146
<button
144147
type="button"
145-
class="u-cursor-pointer"
148+
disabled={editing}
149+
class:cursor-pointer={!editing}
150+
class:cursor-not-allowed={editing}
146151
on:click={(e) => {
147152
if (!supportsStringEncryption) {
148153
toggle(e);
@@ -185,7 +190,16 @@
185190
186191
// no cursor when disabled
187192
&.disabled-checkbox :global(button) {
188-
cursor: unset !important;
193+
cursor: unset;
189194
}
190195
}
196+
197+
.cursor-pointer {
198+
// !important is needed
199+
cursor: pointer !important;
200+
}
201+
202+
.cursor-not-allowed {
203+
cursor: not-allowed;
204+
}
191205
</style>

0 commit comments

Comments
 (0)