Skip to content

Commit

Permalink
fix: typing
Browse files Browse the repository at this point in the history
  • Loading branch information
si3nloong committed Dec 18, 2021
1 parent eccc724 commit da8eb73
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 29 deletions.
12 changes: 2 additions & 10 deletions components/chip/src/Chip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
export { className as class };
export let ref: HTMLInputElement;
export let name = "";
export let size = "large";
export let label = "";
export let disabled = false;
export let checked = false;
export let value = "";
Expand All @@ -23,13 +21,13 @@
on:click
/>
<label
class="resp-chip resp-chip--{size} {className}"
class="resp-chip {className}"
class:resp-chip--disabled={disabled}
data-value={value}
for={id}
{...$$restProps}
>
<slot>{label}</slot>
<slot />
</label>

<style lang="scss" global>
Expand All @@ -46,12 +44,6 @@
background: transparent;
overflow: hidden;
&--large {
font-size: 14px;
padding: 3px 12px;
border-radius: 14px;
}
&--disabled {
cursor: not-allowed;
text-decoration: line-through;
Expand Down
2 changes: 0 additions & 2 deletions components/chip/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ import type { SvelteComponentTyped } from "svelte/internal";
export interface ChipProps {
id?: string;
ref?: HTMLInputElement;
sizeOf?: "sm" | "md" | "lg";
title?: string;
name?: string;
label?: string;
disabled?: boolean;
checked?: boolean;
value: string;
Expand Down
17 changes: 1 addition & 16 deletions components/table/src/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
export let rowKey: keyof TableItem = "id";
export let loading = false;
export let tableLayout = "fixed";
export let size = "small";
export let showHeader = true;
export let columns: Partial<TableColumn>[] = [];
export let items: TableItem[] = [];
Expand Down Expand Up @@ -40,7 +39,7 @@
</script>

<div
class="resp-table resp-table--{size} {className}"
class="resp-table {className}"
class:resp-table--bordered={bordered}
class:resp-table--striped={striped}
bind:this={ref}
Expand Down Expand Up @@ -172,20 +171,6 @@
}
}
&--small table tr {
td,
th {
padding: 6px 10px;
}
}
&--large table tr {
td,
th {
padding: 15px;
}
}
&__col {
&--ellipsis {
white-space: nowrap;
Expand Down
1 change: 0 additions & 1 deletion components/table/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ export type TableProps = {
rowKey?: keyof TableItem;
title?: string;
tableLayout?: "fixed" | "auto" | "inherit" | "initial";
size?: "small" | "medium" | "large";
columns: Partial<TableColumn>[];
items: null | TableItem[];
class?: string;
Expand Down
2 changes: 2 additions & 0 deletions components/tooltip/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ import type { SvelteComponentTyped } from "svelte/internal";
export type TooltipTrigger = "mouseover" | "focus" | "click";

export interface TooltipProps {
id?: string;
class?: string;
offset?: number;
trigger?: TooltipTrigger[];
style?: string;
}

interface TooltipEvents {}
Expand Down

0 comments on commit da8eb73

Please sign in to comment.