feat: add some stuff
This commit is contained in:
18
src/components/button/Button.svelte
Normal file
18
src/components/button/Button.svelte
Normal file
@@ -0,0 +1,18 @@
|
||||
<script lang="ts">
|
||||
export let classes = "";
|
||||
</script>
|
||||
|
||||
<button class="bg-light p-2 rounded-md ml-2 px-4 {classes}">
|
||||
<slot />
|
||||
</button>
|
||||
|
||||
<style>
|
||||
button {
|
||||
background-color: var(--background-light);
|
||||
border-radius: var(--border-radius-md);
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
font-size: var(--font-size-md);
|
||||
transition: background-color 0.3s;
|
||||
}
|
||||
</style>
|
||||
5
src/components/button/Icon.svelte
Normal file
5
src/components/button/Icon.svelte
Normal file
@@ -0,0 +1,5 @@
|
||||
<script lang="ts">
|
||||
export let icon: string;
|
||||
</script>
|
||||
|
||||
<span class="i-tabler-{icon}" />
|
||||
12
src/components/button/index.ts
Normal file
12
src/components/button/index.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import _Button from './Button.svelte';
|
||||
import Icon from './Icon.svelte';
|
||||
|
||||
const Button = {
|
||||
..._Button,
|
||||
Icon,
|
||||
} as typeof _Button & {
|
||||
Icon: typeof Icon;
|
||||
};
|
||||
|
||||
|
||||
export { Button }
|
||||
Reference in New Issue
Block a user