Skip to content

Commit

Permalink
Add additional tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
cyderize committed Aug 20, 2024
1 parent eb42bbd commit 22e2ca0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/lib/Dropdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
const dispatch = createEventDispatcher();
/**
* @type {string | null}
*/
export let title = null;
export let items = [];
/**
* @type {any | null}
Expand All @@ -30,7 +34,7 @@

<svelte:body on:click={bodyClick} />

<div class="dropdown" class:is-active={active} bind:this={element}>
<div class="dropdown" class:is-active={active} bind:this={element} {title}>
<div class="dropdown-trigger">
<button class="button" on:click={() => (active = !active)} {disabled}>
<span>
Expand Down
9 changes: 7 additions & 2 deletions src/lib/Playground.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -972,8 +972,11 @@
$: dispatch('solversChanged', { solvers });
export function isDefaultSolver() {
return currentSolverIndex ===
(solvers.findIndex((s) => s.extraInfo && s.extraInfo.isDefault) || 0);
return (
currentSolverIndex ===
(solvers.findIndex((s) => s.extraInfo && s.extraInfo.isDefault) ||
0)
);
}
export function isDefaultSolverConfig() {
Expand Down Expand Up @@ -1040,6 +1043,7 @@
: minizincVersions.latest}
on:selectItem={selectVersion}
disabled={isRunning}
title="Configure MiniZinc version"
>
<span slot="item" let:item>
{item.label} ({item.detail})
Expand Down Expand Up @@ -1102,6 +1106,7 @@
<button
class="button is-primary"
on:click={toggleSolverConfig}
title="Solver configuration"
>
<span class="icon">
<Fa icon={faCog} />
Expand Down

0 comments on commit 22e2ca0

Please sign in to comment.