mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
test: fix svelte-check errors/hints
This commit is contained in:
parent
eaa1603d42
commit
cda0141f75
4 changed files with 10 additions and 74 deletions
|
@ -21,7 +21,6 @@
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
icon="{Add16}"
|
icon="{Add16}"
|
||||||
hasIconOnly
|
|
||||||
tooltipPosition="bottom"
|
tooltipPosition="bottom"
|
||||||
tooltipAlignment="center"
|
tooltipAlignment="center"
|
||||||
iconDescription="Tooltip text"
|
iconDescription="Tooltip text"
|
||||||
|
|
|
@ -1,32 +1,11 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ContentSwitcher, Switch } from "../types";
|
import { ContentSwitcher, Switch } from "../types";
|
||||||
import Bullhorn16 from "carbon-icons-svelte/lib/Bullhorn16";
|
|
||||||
import Analytics16 from "carbon-icons-svelte/lib/Analytics16";
|
import Analytics16 from "carbon-icons-svelte/lib/Analytics16";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<ContentSwitcher>
|
<ContentSwitcher size="xl" selectedIndex="{1}">
|
||||||
<Switch text="Latest news" />
|
<Switch disabled text="Latest news" />
|
||||||
<Switch text="Trending" />
|
<Switch text="Trending" />
|
||||||
</ContentSwitcher>
|
|
||||||
|
|
||||||
<ContentSwitcher selectedIndex="{1}">
|
|
||||||
<Switch text="Latest news" />
|
|
||||||
<Switch text="Trending" />
|
|
||||||
<Switch text="Recommended" />
|
|
||||||
</ContentSwitcher>
|
|
||||||
|
|
||||||
<ContentSwitcher light>
|
|
||||||
<Switch text="Latest news" />
|
|
||||||
<Switch text="Trending" />
|
|
||||||
</ContentSwitcher>
|
|
||||||
|
|
||||||
<ContentSwitcher>
|
|
||||||
<Switch>
|
|
||||||
<div style="display: flex; align-items: center;">
|
|
||||||
<Bullhorn16 style="margin-right: 0.5rem;" />
|
|
||||||
Latest news
|
|
||||||
</div>
|
|
||||||
</Switch>
|
|
||||||
<Switch>
|
<Switch>
|
||||||
<div style="display: flex; align-items: center;">
|
<div style="display: flex; align-items: center;">
|
||||||
<Analytics16 style="margin-right: 0.5rem;" />
|
<Analytics16 style="margin-right: 0.5rem;" />
|
||||||
|
@ -34,22 +13,3 @@
|
||||||
</div>
|
</div>
|
||||||
</Switch>
|
</Switch>
|
||||||
</ContentSwitcher>
|
</ContentSwitcher>
|
||||||
|
|
||||||
<Bullhorn16 style="margin-right: 0.5rem;" />
|
|
||||||
|
|
||||||
<Analytics16 style="margin-right: 0.5rem;" />
|
|
||||||
|
|
||||||
<ContentSwitcher size="xl">
|
|
||||||
<Switch text="All" />
|
|
||||||
<Switch text="Archived" />
|
|
||||||
</ContentSwitcher>
|
|
||||||
|
|
||||||
<ContentSwitcher size="sm">
|
|
||||||
<Switch text="All" />
|
|
||||||
<Switch text="Archived" />
|
|
||||||
</ContentSwitcher>
|
|
||||||
|
|
||||||
<ContentSwitcher>
|
|
||||||
<Switch disabled text="All" />
|
|
||||||
<Switch disabled text="Archived" />
|
|
||||||
</ContentSwitcher>
|
|
||||||
|
|
|
@ -111,7 +111,7 @@
|
||||||
<ToolbarContent>
|
<ToolbarContent>
|
||||||
<ToolbarSearch
|
<ToolbarSearch
|
||||||
shouldFilterRows="{(row, value) => {
|
shouldFilterRows="{(row, value) => {
|
||||||
return true;
|
return row.name.includes(value);
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
<ToolbarMenu>
|
<ToolbarMenu>
|
||||||
|
|
|
@ -8,40 +8,17 @@
|
||||||
{value}
|
{value}
|
||||||
|
|
||||||
<NumberInput
|
<NumberInput
|
||||||
|
disabled
|
||||||
|
light
|
||||||
|
min="{4}"
|
||||||
|
max="{20}"
|
||||||
|
value="{4}"
|
||||||
label="Clusters"
|
label="Clusters"
|
||||||
|
helperText="Clusters provisioned in your region"
|
||||||
|
invalidText="Number must be between 4 and 20."
|
||||||
on:change="{(e) => {
|
on:change="{(e) => {
|
||||||
console.log(e.detail); // null | number
|
console.log(e.detail); // null | number
|
||||||
}}"
|
}}"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<NumberInput
|
|
||||||
label="Clusters"
|
|
||||||
helperText="Clusters provisioned in your region"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<NumberInput
|
|
||||||
min="{4}"
|
|
||||||
max="{20}"
|
|
||||||
value="{4}"
|
|
||||||
invalidText="Number must be between 4 and 20."
|
|
||||||
helperText="Clusters provisioned in your region"
|
|
||||||
label="Clusters (4 min, 20 max)"
|
|
||||||
/>
|
|
||||||
|
|
||||||
<NumberInput hideLabel label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInput light label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInput mobile label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInput size="xl" label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInput size="sm" label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInput invalid invalidText="An error occurred" label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInput disabled label="Clusters" />
|
|
||||||
|
|
||||||
<NumberInputSkeleton />
|
|
||||||
|
|
||||||
<NumberInputSkeleton hideLabel />
|
<NumberInputSkeleton hideLabel />
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue