mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 10:21:05 +00:00
parent
17730914d3
commit
fc366a9366
21 changed files with 518 additions and 23 deletions
22
src/components/ComposedModal/ModalBody.svelte
Normal file
22
src/components/ComposedModal/ModalBody.svelte
Normal file
|
@ -0,0 +1,22 @@
|
|||
<script>
|
||||
let className = undefined;
|
||||
export { className as class };
|
||||
export let hasForm = false;
|
||||
export let hasScrollingContent = false;
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
|
||||
const _class = cx('--modal-content', hasForm && '--modal-content--with-form', className);
|
||||
</script>
|
||||
|
||||
<div
|
||||
tabindex={hasScrollingContent ? '0' : undefined}
|
||||
role={hasScrollingContent ? 'region' : undefined}
|
||||
class={_class}
|
||||
{style}>
|
||||
<slot />
|
||||
</div>
|
||||
{#if hasScrollingContent}
|
||||
<div class={cx('--modal-content--overflow-indicator')} />
|
||||
{/if}
|
Loading…
Add table
Add a link
Reference in a new issue