mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
- Inline class assignments to avoid script-level clutter - Ignore a11y-missing-attribute instead of redundant href
20 lines
534 B
Svelte
20 lines
534 B
Svelte
<script>
|
|
let className = undefined;
|
|
export { className as class };
|
|
export let hasForm = false;
|
|
export let hasScrollingContent = false;
|
|
export let style = undefined;
|
|
|
|
import { cx } from '../../lib';
|
|
</script>
|
|
|
|
<div
|
|
tabindex={hasScrollingContent ? '0' : undefined}
|
|
role={hasScrollingContent ? 'region' : undefined}
|
|
class={cx('--modal-content', hasForm && '--modal-content--with-form', className)}
|
|
{style}>
|
|
<slot />
|
|
</div>
|
|
{#if hasScrollingContent}
|
|
<div class={cx('--modal-content--overflow-indicator')} />
|
|
{/if}
|