Fix modal content size prop

This commit is contained in:
Andrew Kingston 2021-05-04 11:07:26 +01:00
parent c010eeb314
commit 7bdf1f9ed2
3 changed files with 10 additions and 11 deletions

View File

@ -7,7 +7,7 @@
import Context from "../context"
export let title = undefined
export let size = "small"
export let size = "S"
export let cancelText = "Cancel"
export let confirmText = "Confirm"
export let showCancelButton = true
@ -30,7 +30,11 @@
</script>
<div
class="spectrum-Dialog spectrum-Dialog--{size}"
class="spectrum-Dialog"
class:spectrum-Dialog--small={size === "S"}
class:spectrum-Dialog--medium={size === "M"}
class:spectrum-Dialog--large={size === "L"}
class:spectrum-Dialog--extraLarge={size === "XL"}
style="position: relative;"
role="dialog"
tabindex="-1"
@ -76,8 +80,8 @@
</div>
<style>
.spectrum-Dialog--XL {
width: 1200px;
.spectrum-Dialog--extraLarge {
width: 1000px;
}
.content-grid {
display: grid;

View File

@ -117,12 +117,7 @@
const getOptionValue = (x) => x.key
</script>
<ModalContent
title="Filter"
confirmText="Save"
onConfirm={saveView}
size="large"
>
<ModalContent title="Filter" confirmText="Save" onConfirm={saveView} size="L">
{#if view.filters.length}
<div class="input-group-row">
{#each view.filters as filter, idx}

View File

@ -43,7 +43,7 @@
<ModalContent
title="Create Datasource"
size="large"
size="L"
confirmText="Create"
onConfirm={saveDatasource}
disabled={error || !name}