Tidy invite delivery choices and align email fields
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
'use client'
|
||||
|
||||
import './invite-delivery.css'
|
||||
|
||||
export default function InviteDeliveryChoice({ value, onChange }: {
|
||||
value: 'manual' | 'email' | '' | null; onChange: (method: 'manual' | 'email') => void
|
||||
}) {
|
||||
return <div className="invite-delivery-options" role="group" aria-label="Invite delivery method">
|
||||
{(['manual', 'email'] as const).map((method) => <button key={method} type="button" aria-pressed={value === method} onClick={() => onChange(method)}>
|
||||
<span className="delivery-choice-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.7" strokeLinecap="round" strokeLinejoin="round">
|
||||
{method === 'manual' ? <><path d="M10 13a5 5 0 0 0 7 0l3-3a5 5 0 0 0-7-7l-2 2" /><path d="M14 11a5 5 0 0 0-7 0l-3 3a5 5 0 0 0 7 7l2-2" /></> : <><rect x="3" y="5" width="18" height="14" rx="3" /><path d="m3 7 9 6 9-6" /></>}
|
||||
</svg></span>
|
||||
<span className="delivery-choice-copy"><strong>{method === 'manual' ? 'Copy a link' : 'Send an email'}</strong><small>{method === 'manual' ? 'Share it yourself. No email needed.' : 'We’ll send the invite. You get the link too.'}</small></span>
|
||||
<span className="delivery-choice-check" aria-hidden="true">{value === method ? '✓' : ''}</span>
|
||||
</button>)}
|
||||
</div>
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
.invite-delivery-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
|
||||
.page .invite-delivery-options > button { display: flex; align-items: center; justify-content: flex-start; gap: 14px; min-height: 96px; padding: 18px; text-align: left; border-radius: 12px; background: var(--ops-panel-2, #202023) !important; border: 1px solid var(--ops-line, #444) !important; color: var(--ops-text, #eee) !important; text-transform: none; }
|
||||
.page .invite-delivery-options > button[aria-pressed='true'] { background: #302d3e !important; border-color: #c7bdff !important; box-shadow: inset 0 0 0 1px #c7bdff; }
|
||||
.invite-delivery-options > button:focus-visible { outline: 2px solid #c7bdff; outline-offset: 3px; }
|
||||
.invite-delivery-options .delivery-choice-icon { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: #ffffff09; color: #c7bdff; }
|
||||
.delivery-choice-icon svg { width: 24px; height: 24px; }
|
||||
.invite-delivery-options .delivery-choice-copy { display: grid; gap: 6px; min-width: 0; flex: 1; }
|
||||
.delivery-choice-copy strong { font-size: .95rem; color: var(--ops-text, #eee); }
|
||||
.delivery-choice-copy small { font-size: .8rem; font-weight: 400; line-height: 1.45; color: var(--ops-muted, #bbb); }
|
||||
.invite-delivery-options .delivery-choice-check { flex: 0 0 20px; width: 20px; height: 20px; border: 1px solid var(--ops-line, #666); border-radius: 50%; display: grid; place-items: center; color: #c7bdff; font-size: .8rem; }
|
||||
.invite-delivery-fields { align-items: start; }
|
||||
.invite-delivery-fields > label { display: grid; align-content: start; gap: 8px; }
|
||||
.invite-delivery-fields input { min-height: 48px; }
|
||||
.invite-delivery-fields textarea { min-height: 88px; resize: vertical; }
|
||||
@media (max-width: 640px) { .invite-delivery-options { grid-template-columns: 1fr; } }
|
||||
Reference in New Issue
Block a user