mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
refactor(code-snippet): pass snippet button class for multi-line
- Remove exported props from CopyButton, skeleton - Replace onMount with reactive statement - Forward events to skeleton - Clean up Story
This commit is contained in:
parent
5ca9f35286
commit
40a7be5c79
3 changed files with 23 additions and 26 deletions
|
@ -2,7 +2,7 @@
|
|||
let className = undefined;
|
||||
export { className as class };
|
||||
export let type = 'single';
|
||||
export let props = {};
|
||||
export let style = undefined;
|
||||
|
||||
import { cx } from '../../lib';
|
||||
|
||||
|
@ -16,13 +16,13 @@
|
|||
</script>
|
||||
|
||||
{#if type === 'single'}
|
||||
<div {...props} class={_class}>
|
||||
<div on:click on:mouseover on:mouseenter on:mouseleave {style} class={_class}>
|
||||
<div class={cx('--snippet-container')}>
|
||||
<span />
|
||||
</div>
|
||||
</div>
|
||||
{:else if type === 'multi'}
|
||||
<div {...props} class={_class}>
|
||||
<div on:click on:mouseover on:mouseenter on:mouseleave {style} class={_class}>
|
||||
<div class={cx('--snippet-container')}>
|
||||
<span />
|
||||
<span />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue