victor HF staff commited on
Commit
c077f8a
1 Parent(s): 4d03e1f

button tweak

Browse files
src/lib/components/Playground/Playground.svelte CHANGED
@@ -218,18 +218,23 @@
218
  >
219
  <button
220
  type="button"
221
- class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
222
  >Share</button
223
  >
224
 
225
  <button
226
  type="button"
227
  on:click={reset}
228
- class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
229
- >Reset</button
 
 
 
 
 
230
  >
231
  <div class="flex-1 items-center justify-center text-center text-sm text-gray-500">
232
- <span class="max-xl:hidden">0 tokens · Latency {latency}ms</span>
233
  </div>
234
  <button
235
  type="button"
 
218
  >
219
  <button
220
  type="button"
221
+ class="flex-none rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
222
  >Share</button
223
  >
224
 
225
  <button
226
  type="button"
227
  on:click={reset}
228
+ class="flex size-[42px] flex-none items-center justify-center rounded-lg border border-gray-200 bg-white text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
229
+ ><svg xmlns="http://www.w3.org/2000/svg" width="1em" height="1em" viewBox="0 0 32 32"
230
+ ><path fill="currentColor" d="M12 12h2v12h-2zm6 0h2v12h-2z" /><path
231
+ fill="currentColor"
232
+ d="M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6zm4 22V8h16v20zm4-26h8v2h-8z"
233
+ /></svg
234
+ ></button
235
  >
236
  <div class="flex-1 items-center justify-center text-center text-sm text-gray-500">
237
+ <span class="max-lg:hidden">0 tokens · Latency {latency}ms</span>
238
  </div>
239
  <button
240
  type="button"
src/lib/components/Playground/PlaygroundModelSelector.svelte ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div class="m-12">
2
+ <div class="relative">
3
+ <button
4
+ class="flex items-center gap-6 whitespace-nowrap rounded-lg border bg-white px-3 py-1.5 leading-tight shadow dark:bg-gray-700"
5
+ >
6
+ <div class="flex flex-col items-start text-sm">
7
+ <div class="text-gray-500 dark:text-gray-300">meta-llama</div>
8
+ <div>Meta-Llama-3-70B-Instruct</div>
9
+ </div>
10
+ <div class="size-5 bg-red-50"></div>
11
+ </button>
12
+ <div class="z-10 w-72 overflow-hidden rounded-lg bg-white shadow dark:bg-gray-700">
13
+ <div>
14
+ <label for="input-group-search" class="sr-only">Search Models</label>
15
+ <div class="relative">
16
+ <div
17
+ class="rtl:inset-r-0 pointer-events-none absolute inset-y-0 start-0 flex items-center ps-3"
18
+ >
19
+ <svg
20
+ class="size-3 text-gray-500 dark:text-gray-400"
21
+ aria-hidden="true"
22
+ xmlns="http://www.w3.org/2000/svg"
23
+ fill="none"
24
+ viewBox="0 0 20 20"
25
+ >
26
+ <path
27
+ stroke="currentColor"
28
+ stroke-linecap="round"
29
+ stroke-linejoin="round"
30
+ stroke-width="2"
31
+ d="m19 19-4-4m0-7A7 7 0 1 1 1 8a7 7 0 0 1 14 0Z"
32
+ />
33
+ </svg>
34
+ </div>
35
+ <input
36
+ type="text"
37
+ id="input-group-search"
38
+ class="block w-full border-b border-gray-300 bg-gray-50 p-2 ps-10 text-sm text-gray-900 focus:outline-none dark:border-gray-500 dark:bg-gray-600 dark:text-white"
39
+ placeholder="Search model"
40
+ />
41
+ </div>
42
+ </div>
43
+ <ul class="h-48 overflow-y-auto pb-3 text-sm text-gray-700 dark:text-gray-200">
44
+ <li>
45
+ <div class="flex items-center rounded p-3 hover:bg-gray-100 dark:hover:bg-gray-600">
46
+ <label
47
+ for="checkbox-item-11"
48
+ class="w-full rounded text-sm font-medium text-gray-900 dark:text-gray-300"
49
+ >Bonnie Green</label
50
+ >
51
+ </div>
52
+ </li>
53
+ </ul>
54
+ <a
55
+ href="#"
56
+ class="flex items-center rounded-b-lg border-t border-gray-200 bg-gray-50 p-3 text-sm font-medium text-red-600 hover:bg-gray-100 hover:underline dark:border-gray-600 dark:bg-gray-700 dark:text-red-500 dark:hover:bg-gray-600"
57
+ >
58
+ Reset
59
+ </a>
60
+ </div>
61
+ </div>
62
+ </div>