Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 45 additions & 7 deletions src/components/InstallPicker.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const releasesUrl =
: 'https://github.com/git-fire/git-rain/releases';

const labelId = `platform-label-${product}`;
const platformGroupId = `platform-group-${product}`;
const methodLabelId = `install-method-label-${product}`;
---

<div
Expand All @@ -22,13 +24,49 @@ const labelId = `platform-label-${product}`;
data-product={product}
>
{!embedded && <p class="install-picker__title">{title}</p>}
<label id={labelId} for={`platform-${product}`}>{embedded ? 'Install' : 'Platform'}</label>
<select id={`platform-${product}`} data-install-select aria-labelledby={labelId}>
<option value="macos">macOS — Homebrew</option>
<option value="windows">Windows — winget</option>
<option value="linux">Linux</option>
<option value="go">Any — Go install</option>
</select>
<p id={labelId} class="install-picker__label">{embedded ? 'Install' : 'Platform'}</p>
<div
id={platformGroupId}
class="install-picker__platforms"
role="radiogroup"
aria-labelledby={labelId}
>
<button
type="button"
role="radio"
aria-checked="false"
class="install-picker__platform-btn"
data-install-platform="macos">macOS</button>
<button
type="button"
role="radio"
aria-checked="false"
class="install-picker__platform-btn"
data-install-platform="windows">Windows</button>
<button
type="button"
role="radio"
aria-checked="false"
class="install-picker__platform-btn"
data-install-platform="linux">Linux</button>
<button
type="button"
role="radio"
aria-checked="false"
class="install-picker__platform-btn"
data-install-platform="go">Go</button>
</div>
<div class="install-picker__method-area" data-install-method-area hidden>
<p id={methodLabelId} class="install-picker__label install-picker__label--method">Install via</p>
<div
class="install-picker__methods"
role="radiogroup"
data-install-method-radiogroup
aria-labelledby={methodLabelId}
>
</div>
</div>
<p class="install-picker__detect-hint" data-install-detect-hint hidden></p>
<pre><code data-install-command></code></pre>
<div class="install-picker__actions">
<button type="button" data-install-copy>Copy</button>
Expand Down
Loading
Loading