Skip to content

Commit

Permalink
Data 2978 add modal variant fix (viamrobotics#566)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrloureed authored Aug 22, 2024
1 parent 8cb62c1 commit 33cc9ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@viamrobotics/prime-core",
"version": "0.0.145",
"version": "0.0.146",
"publishConfig": {
"access": "public"
},
Expand Down
15 changes: 9 additions & 6 deletions packages/core/src/lib/modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,15 @@ $: if (typeof document !== 'undefined') {
>
<div
use:clickOutside={handleCloseModal}
class={cx('relative border border-medium bg-white p-6 shadow-sm', {
'h-[400px] w-[480px]': variant === '',
'h-[600px] w-[800px]': variant === 'medium',
'max-h-[320px] w-[400px]': variant === 'small',
'overflow-y-auto': true,
})}
class={cx(
'relative min-w-[400px] border border-medium bg-white p-6 shadow-sm',
{
'max-h-[400px] max-w-[480px]': variant === '',
'max-h-[600px] max-w-[800px]': variant === 'medium',
'max-h-[320px] max-w-[400px]': variant === 'small',
'overflow-y-auto': true,
}
)}
>
<IconButton
cx="absolute right-4 top-4 text-gray-6"
Expand Down
2 changes: 1 addition & 1 deletion packages/legacy/src/elements/modal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const handleClose = (event: MouseEvent | KeyboardEvent) => {
on:keyup|preventDefault={handleClose}
>
<div
class={cx('relative max-w-lg border border-medium bg-white p-6 shadow-sm', {
class={cx('relative border border-medium bg-white p-6 shadow-sm', {
'max-h-[600px] min-h-[400px] w-[480px]': variant === '',
'max-h-[320px] w-[400px]': variant === 'small',
})}
Expand Down

0 comments on commit 33cc9ff

Please sign in to comment.