-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/beat-forge/clients
- Loading branch information
Showing
8 changed files
with
133 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"editor.formatOnSave": true, | ||
"prettier.requireConfig": true, | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"[svelte]": { | ||
"editor.defaultFormatter": "svelte.svelte-vscode" | ||
}, | ||
"editor.quickSuggestions": { | ||
"strings": true | ||
}, | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll.eslint": true | ||
}, | ||
"eslint.workingDirectories": [{ "mode": "auto" }], | ||
"eslint.validate": [ | ||
"svelte" | ||
], | ||
"[javascript]": { | ||
"editor.defaultFormatter": "ms-vsliveshare.vsliveshare" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import ButtonsView from './views/ButtonsView.svelte'; | ||
|
||
export default { | ||
title: 'ui/Buttons', | ||
component: ButtonsView, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
variant: { | ||
control: { | ||
type: 'select', | ||
}, | ||
options: ['primary', 'secondary', 'download'], | ||
}, | ||
disabled: { | ||
control: { | ||
type: 'boolean', | ||
}, | ||
}, | ||
customClasses: { | ||
control: { | ||
type: 'text', | ||
}, | ||
}, | ||
}, | ||
}; | ||
export const Default = { | ||
args: { | ||
variant: 'primary', | ||
disabled: false, | ||
}, | ||
}; | ||
export const Secondary = { | ||
args: { | ||
variant: 'secondary', | ||
disabled: false, | ||
}, | ||
}; | ||
export const Download = { | ||
args: { | ||
variant: 'download', | ||
disabled: false, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
import IconsView from './views/IconsView.svelte'; | ||
|
||
export default { | ||
title: 'ui/Icons', | ||
component: IconsView, | ||
tags: ['autodocs'], | ||
argTypes: { | ||
className: "h-8 w-8" | ||
} | ||
title: 'ui/Icons', | ||
component: IconsView, | ||
tags: ['autodocs'], | ||
}; | ||
|
||
export const Default = { | ||
args: { | ||
className: "h-8 w-8" | ||
} | ||
} | ||
args: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script> | ||
import { Button, LogoIcon } from 'ui/index.ts'; | ||
/** | ||
* | ||
*/ | ||
function handleClick() { | ||
console.log('clicked'); | ||
} | ||
</script> | ||
|
||
<div class="flex gap-2"> | ||
<Button on:click={handleClick} {...$$props}> | ||
<div class="contents" slot="content">This is a button</div> | ||
</Button> | ||
<Button on:click={handleClick} {...$$props}> | ||
<div class="contents" slot="leading"> | ||
<LogoIcon className="w-5 h-5" /> | ||
</div> | ||
<div class="contents" slot="content">This is a logo button</div> | ||
</Button> | ||
<Button on:click={handleClick} {...$$props}> | ||
<div class="contents" slot="content">This is a version button</div> | ||
<div class="contents" slot="trailing"> | ||
<span class="rounded-3xl -mr-2 px-2 py-1 bg-[#ffffff44]"> v1.0.0 </span> | ||
</div> | ||
</Button> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script> | ||
// Variants: primary, secondary, download | ||
export let variant; | ||
// Disabled: boolean | ||
export let disabled; | ||
export let customClasses; | ||
const variantClasses = { | ||
primary: 'bg-primary-50 hover:bg-primary-100 text-black-950', | ||
secondary: 'bg-primary-800 hover:bg-primary-900 text-white', | ||
download: | ||
'hover:-translate-y-[2px] bg-gradient-to-r from-[#47334f] to-[#2d2c4f] text-white duration-[200ms] ease-[cubic-bezier(0.22,0.61,0.36,1)]', | ||
}; | ||
let buttonClasses = `disabled:opacity-50 flex flex-row items-center justify-center transition-all duration-[80ms] px-4 py-2 rounded-full gap-2 font-bold text-sm ${variantClasses[variant]} ${customClasses}`; | ||
</script> | ||
|
||
<button {disabled} class={buttonClasses}> | ||
<slot name="leading" /> | ||
<slot name="content" /> | ||
<slot name="trailing" /> | ||
</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters