Skip to content

Commit

Permalink
Update Label spacing (#2336)
Browse files Browse the repository at this point in the history
* Update Combobox Label spacing to match Select

* Update Label spacing on Holocene components to match Select and Input

* Update Label spacing on custom components

---------

Co-authored-by: Alex Tideman <[email protected]>
  • Loading branch information
laurakwhit and Alex-Tideman authored Sep 23, 2024
1 parent 68707df commit ec72f61
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib/components/schedule/schedule-input-payload.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
};
</script>

<div class="flex flex-col gap-4">
<div class="flex flex-col gap-1">
<Label for="schedule-input" label={translate('workflows.input')} />
<PayloadDecoder
value={payloads}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/holocene/combobox/combobox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@
</script>

<MenuContainer {open} on:close={handleMenuClose}>
<Label hidden={labelHidden} {required} {label} for={id} />
<Label class="pb-1" hidden={labelHidden} {required} {label} for={id} />
<div class="combobox-wrapper" class:disabled class:invalid={!valid}>
{#if leadingIcon}
<Icon width={20} height={20} class="ml-2 shrink-0" name={leadingIcon} />
Expand Down
9 changes: 8 additions & 1 deletion src/lib/holocene/input/chip-input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,14 @@
</script>

<div class={merge(disabled && 'cursor-not-allowed', className)}>
<Label {required} {label} {disabled} hidden={labelHidden} for={id} />
<Label
class="pb-1"
{required}
{label}
{disabled}
hidden={labelHidden}
for={id}
/>
<div
bind:this={inputContainer}
class={merge(
Expand Down
2 changes: 1 addition & 1 deletion src/lib/holocene/orderable-list/orderable-list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<style lang="postcss">
.orderable-section {
@apply flex flex-col gap-2;
@apply flex flex-col gap-1;
}
.orderable-list {
Expand Down
6 changes: 3 additions & 3 deletions src/lib/holocene/textarea.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@
export { className as class };
</script>

<div class={merge('group', className)}>
<div class={merge('group flex flex-col gap-1', className)}>
<Label {required} hidden={labelHidden} {label} for={id} />
{#if description}
<p class="pb-2 text-sm">{description}</p>
<p class="-mt-1 text-sm">{description}</p>
{/if}
<div
class={merge(
Expand Down Expand Up @@ -70,7 +70,7 @@
maxlength={maxLength > 0 ? maxLength : undefined}
/>
</div>
<div class="mt-2 flex justify-between gap-2">
<div class="flex justify-between gap-2">
<div
class="error-msg"
class:min-width={maxLength}
Expand Down

0 comments on commit ec72f61

Please sign in to comment.