You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
svelte/test/runtime-puppeteer/samples/svelte-component-css-custom.../main.svelte

23 lines
509 B

<script>
import Slider1 from './Slider1.svelte';
import Slider2 from './Slider2.svelte';
export let componentName = 'Slider1';
$: slider = componentName === 'Slider1' ? Slider1 : componentName === 'Slider2' ? Slider2 : undefined;
</script>
<section>
<svelte:component
this={slider}
id="component1"
--rail-color="rgb(0, 0, 0)"
--track-color="rgb(255, 0, 0)"
/>
<svelte:component
this={slider}
id="component2"
--rail-color="rgb(0, 255, 0)"
--track-color="rgb(0, 0, 255)"
/>
</section>