mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-14 18:01:06 +00:00
test(inline-notification): add unit tests
This commit is contained in:
parent
d67b3e0a84
commit
7317192e90
5 changed files with 211 additions and 49 deletions
29
tests/InlineNotification/InlineNotification.test.svelte
Normal file
29
tests/InlineNotification/InlineNotification.test.svelte
Normal file
|
@ -0,0 +1,29 @@
|
|||
<script lang="ts">
|
||||
import { InlineNotification } from "carbon-components-svelte";
|
||||
import type { ComponentProps } from "svelte";
|
||||
|
||||
export let kind: ComponentProps<InlineNotification>["kind"] = "error";
|
||||
export let lowContrast = false;
|
||||
export let timeout = 0;
|
||||
export let role = "alert";
|
||||
export let title = "Error:";
|
||||
export let subtitle = "An internal server error occurred.";
|
||||
export let hideCloseButton = false;
|
||||
export let statusIconDescription = "";
|
||||
export let closeButtonDescription = "";
|
||||
</script>
|
||||
|
||||
<InlineNotification
|
||||
{kind}
|
||||
{lowContrast}
|
||||
{timeout}
|
||||
{role}
|
||||
{title}
|
||||
{subtitle}
|
||||
{hideCloseButton}
|
||||
{statusIconDescription}
|
||||
{closeButtonDescription}
|
||||
on:close={(e) => {
|
||||
console.log("close", e.detail);
|
||||
}}
|
||||
/>
|
Loading…
Add table
Add a link
Reference in a new issue