Add tooltips to all buttons and tweak hover colors

This commit is contained in:
Misode
2021-09-25 07:10:54 +02:00
parent 7db47938b8
commit 2cb14a2c10
13 changed files with 251 additions and 96 deletions

View File

@@ -7,9 +7,10 @@ type BtnInputProps = {
large?: boolean,
doSelect?: number,
value?: string,
placeholder?: string,
onChange?: (value: string) => unknown,
}
export function BtnInput({ icon, label, large, doSelect, value, onChange }: BtnInputProps) {
export function BtnInput({ icon, label, large, doSelect, value, placeholder, onChange }: BtnInputProps) {
const onInput = onChange === undefined ? () => {} : (e: any) => {
const value = (e.target as HTMLInputElement).value
onChange?.(value)
@@ -25,6 +26,6 @@ export function BtnInput({ icon, label, large, doSelect, value, onChange }: BtnI
return <div class={`btn btn-input ${large ? 'large-input' : ''}`} onClick={e => e.stopPropagation()}>
{icon && Octicon[icon]}
{label && <span>{label}</span>}
<input ref={ref} type="text" value={value} onChange={onInput} />
<input ref={ref} type="text" value={value} onChange={onInput} placeholder={placeholder} />
</div>
}