mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
25 lines
650 B
Svelte
25 lines
650 B
Svelte
<script>
|
|
/**
|
|
* Set to `true` if the modal contains form elements
|
|
* @type {boolean} [hasForm=false]
|
|
*/
|
|
export let hasForm = false;
|
|
|
|
/**
|
|
* Set to `true` if the modal contains scrolling content
|
|
* @type {boolean} [hasScrollingContent=false]
|
|
*/
|
|
export let hasScrollingContent = false;
|
|
</script>
|
|
|
|
<div
|
|
tabindex="{hasScrollingContent ? '0' : undefined}"
|
|
role="{hasScrollingContent ? 'region' : undefined}"
|
|
class:bx--modal-content="{true}"
|
|
class:bx--modal-content--with-form="{hasForm}"
|
|
{...$$restProps}>
|
|
<slot />
|
|
</div>
|
|
{#if hasScrollingContent}
|
|
<div class:bx--modal-content--overflow-indicator="{true}"></div>
|
|
{/if}
|