Budibase is an open-source low-code platform for creating internal apps in minutes. Supports PostgreSQL, MySQL, MSSQL, MongoDB, Rest API, Docker, K8s 🚀
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

46 lines
868 B

<script>
export let value = ""
export let text = ""
export let icon = ""
export let onClick = () => {}
export let selected = false
$: useIcon = !!icon
</script>
<div class="flatbutton" class:selected on:click={() => onClick(value || text)}>
{#if useIcon}
<i class={icon} />
{:else}
<span>
{@html text}
</span>
{/if}
</div>
<style>
.flatbutton {
cursor: pointer;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
background: var(--background);
color: var(--grey-7);
border-radius: var(--border-radius-m);
font-size: var(--font-size-xs);
font-weight: 500;
transition: all 0.3s;
text-rendering: optimizeLegibility;
}
.selected {
background: var(--grey-2);
color: var(--ink);
}
i {
font-size: 16px;
}
</style>