Skip to content

Commit

Permalink
66 inputs & selects (#79)
Browse files Browse the repository at this point in the history
closes #66

---------

Co-authored-by: Claire Olmstead <[email protected]>
  • Loading branch information
claireolmstead and claireolmstead authored Jan 12, 2024
1 parent eb256cd commit 7c422db
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
8 changes: 1 addition & 7 deletions src/components/Connect.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@

<div class="pt-8">
<p class="text-2xl"><label for="provider-list">Select a Network</label></p>
<select
id="provider-list"
required
bind:value={selectedProvider}
class="text-left bg-green5 pr-8 pl-4 py-2 rounded-md border-0"
>
<select id="provider-list" required bind:value={selectedProvider}>
{#each Object.keys(ProviderMap) as providerName}
<option value={providerName} class="bg-base">{providerName}: {ProviderMap[providerName]}</option>
{/each}
Expand All @@ -91,7 +86,6 @@
bind:value={otherProvider}
disabled={selectedProvider.toString() != 'Other'}
class:hidden={selectedProvider.toString() != 'Other'}
class="w-500 rounded text-white"
/>
<button
on:click|preventDefault={async () => await connect()}
Expand Down
7 changes: 3 additions & 4 deletions src/components/CreateProvider.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
export let validAccounts = {};
export let signingAddress = '';
// a callback for when the user cancels this action
export let cancelAction;
export let cancelAction = () => {};
// a callback for when a transaction hits a final state
export let txnFinished = () => {
console.log('default txnFinished callback');
Expand Down Expand Up @@ -94,10 +94,9 @@
</p>
<form>
<label for="providerNameCB">Provider name</label>
<input id="providerNameCB" required placeholder="Short name" maxlength="" bind:value={newProviderName} />
<input id="providerNameCB" required placeholder="Short name" maxlength={100} bind:value={newProviderName} />
<div class="flex w-350 justify-between">
<button id="create-provider-btn" on:click|preventDefault={doCreateProvider}
class="btn-primary">
<button id="create-provider-btn" on:click|preventDefault={doCreateProvider} class="btn-primary">
Create Provider
</button>
<button on:click|preventDefault={cancelAction} class="btn-no-fill">Cancel</button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Stake.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<div class="mt-6">
<label for="stakingInput">Amount to Stake in <span class="units">{token}</span></label>
<div class="input-container mt-2">
<input type="number" id="stakingInput" value="1" style="text-align: right;" on:input={handleInput} />
<input type="number" id="stakingInput" value="1" on:input={handleInput} />
</div>
</div>
<div class="flex w-350 justify-between">
Expand Down
15 changes: 11 additions & 4 deletions src/style/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@
.btn-no-fill {
@apply text-white underline text-sm;
}
select {
@apply text-black px-6 py-2 rounded-md border-0 w-500 h-14 font-medium text-lg;
}
.action-card {
@apply mt-8 p-8 shrink-0 rounded-lg text-white shadow-md;
}
.action-card input {
.action-card {
@apply rounded text-white;
}
.action-card-title {
Expand Down Expand Up @@ -59,4 +56,14 @@
button {
@apply select-none;
}

input,
[type='text'],
select {
@apply w-[320px] h-[30px] text-black rounded-md text-sm py-0 px-2 border-none outline-none disabled:opacity-85 disabled:text-disabled;
}

::placeholder {
@apply text-disabled !important;
}
}

0 comments on commit 7c422db

Please sign in to comment.