Suggestions.svelte 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <script lang="ts">
  2. export let submitPrompt: Function;
  3. </script>
  4. <div class=" grid sm:grid-cols-2 gap-2.5 mb-4 md:p-2 text-left">
  5. <button
  6. class=" flex justify-between w-full px-4 py-2.5 bg-white dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  7. on:click={() => {
  8. submitPrompt(`Tell me a random fun fact about the Roman Empire`);
  9. }}
  10. >
  11. <div class="flex flex-col text-left">
  12. <div class="text-sm font-medium dark:text-gray-300">Tell me a fun fact</div>
  13. <div class="text-sm text-gray-500">about the Roman Empire</div>
  14. </div>
  15. <div
  16. class="self-center text-white group-hover:text-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  17. >
  18. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" class="w-4 h-4"
  19. ><path
  20. d="M.5 1.163A1 1 0 0 1 1.97.28l12.868 6.837a1 1 0 0 1 0 1.766L1.969 15.72A1 1 0 0 1 .5 14.836V10.33a1 1 0 0 1 .816-.983L8.5 8 1.316 6.653A1 1 0 0 1 .5 5.67V1.163Z"
  21. fill="currentColor"
  22. /></svg
  23. >
  24. </div>
  25. </button>
  26. <button
  27. class="flex justify-between w-full px-4 py-2.5 bg-white dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  28. on:click={() => {
  29. submitPrompt(`Show me a code snippet of a website's sticky header in CSS and JavaScript.`);
  30. }}
  31. >
  32. <div class="flex flex-col text-left">
  33. <div class="text-sm font-medium dark:text-gray-300">Show me a code snippet</div>
  34. <div class="text-sm text-gray-500">of a website's sticky header</div>
  35. </div>
  36. <div
  37. class="self-center text-white group-hover:text-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  38. >
  39. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" class="w-4 h-4"
  40. ><path
  41. d="M.5 1.163A1 1 0 0 1 1.97.28l12.868 6.837a1 1 0 0 1 0 1.766L1.969 15.72A1 1 0 0 1 .5 14.836V10.33a1 1 0 0 1 .816-.983L8.5 8 1.316 6.653A1 1 0 0 1 .5 5.67V1.163Z"
  42. fill="currentColor"
  43. /></svg
  44. >
  45. </div>
  46. </button>
  47. <button
  48. class=" hidden sm:flex justify-between w-full px-4 py-2.5 bg-white dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  49. on:click={() => {
  50. submitPrompt(
  51. `Help me study vocabulary: write a sentence for me to fill in the blank, and I'll try to pick the correct option.`
  52. );
  53. }}
  54. >
  55. <div class="flex flex-col text-left">
  56. <div class="text-sm font-medium dark:text-gray-300">Help me study</div>
  57. <div class="text-sm text-gray-500">vocabulary for a college entrance exam</div>
  58. </div>
  59. <div
  60. class="self-center text-white group-hover:text-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  61. >
  62. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" class="w-4 h-4"
  63. ><path
  64. d="M.5 1.163A1 1 0 0 1 1.97.28l12.868 6.837a1 1 0 0 1 0 1.766L1.969 15.72A1 1 0 0 1 .5 14.836V10.33a1 1 0 0 1 .816-.983L8.5 8 1.316 6.653A1 1 0 0 1 .5 5.67V1.163Z"
  65. fill="currentColor"
  66. /></svg
  67. >
  68. </div>
  69. </button>
  70. <button
  71. class=" hidden sm:flex justify-between w-full px-4 py-2.5 bg-white dark:bg-gray-800 dark:hover:bg-gray-700 outline outline-1 outline-gray-200 dark:outline-gray-600 rounded-lg transition group"
  72. on:click={() => {
  73. submitPrompt(
  74. `What are 5 creative things I could do with my kids' art? I don't want to throw them away, but it's also so much clutter.`
  75. );
  76. }}
  77. >
  78. <div class="flex flex-col text-left">
  79. <div class="text-sm font-medium dark:text-gray-300">Give me ideas</div>
  80. <div class="text-sm text-gray-500">for what to do with my kids' art</div>
  81. </div>
  82. <div
  83. class="self-center text-white group-hover:text-gray-800 dark:group-hover:text-gray-300 dark:text-gray-800 transition"
  84. >
  85. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="none" class="w-4 h-4"
  86. ><path
  87. d="M.5 1.163A1 1 0 0 1 1.97.28l12.868 6.837a1 1 0 0 1 0 1.766L1.969 15.72A1 1 0 0 1 .5 14.836V10.33a1 1 0 0 1 .816-.983L8.5 8 1.316 6.653A1 1 0 0 1 .5 5.67V1.163Z"
  88. fill="currentColor"
  89. /></svg
  90. >
  91. </div>
  92. </button>
  93. </div>