WhatsNew.tsx

1.4 KB · raw

1import { For, Show } from "solid-js";2import { PeachMark } from "../components/PeachMark";3import { CURRENT_NOTES, PEACH_VERSION, markWhatsNewSeen } from "../../shared/release-notes";45export function WhatsNewView(props: { onContinue: () => void }) {6  async function continueClicked() {7    await markWhatsNewSeen();8    props.onContinue();9  }1011  return (12    <div class="peach-whats-new peach-theme">13      <div class="peach-whats-new-inner">14        <div class="peach-whats-new-header">15          <PeachMark class="peach-whats-new-mark" />16          <h1 class="peach-whats-new-title">what's new</h1>17          <span class="peach-whats-new-version">v{PEACH_VERSION}</span>18        </div>1920        <div class="peach-whats-new-scroll">21          <For each={CURRENT_NOTES}>22            {(note) => (23              <div classList={{ "peach-whats-new-note": true, "is-breaking": !!note.breaking }}>24                <Show when={note.breaking}>25                  <span class="peach-whats-new-badge">breaking</span>26                </Show>27                <h2 class="peach-whats-new-note-heading">{note.heading}</h2>28                <p class="peach-whats-new-note-body">{note.body}</p>29              </div>30            )}31          </For>32        </div>3334        <button class="peach-btn peach-btn--accent peach-whats-new-continue" onClick={continueClicked}>35          Continue36        </button>37      </div>38    </div>39  );40}