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

View File

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

View File

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