Simplify: promote inline Big import type, merge duplicate hover/highlighted CSS rules
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
import { convertById } from '$lib/convert';
|
||||
import { FRACTIONAL_DIGITS } from '$lib/config';
|
||||
import { formatBig } from '$lib/format';
|
||||
import type { Big } from 'big.js';
|
||||
import type { Unit, ResultItem } from '$lib/types';
|
||||
import ConverterCard from '../components/ConverterCard.svelte';
|
||||
|
||||
@@ -94,7 +95,7 @@
|
||||
fromUnitId = id;
|
||||
}
|
||||
|
||||
function handleCtrlClick(id: string, convertedValue: import('big.js').Big) {
|
||||
function handleCtrlClick(id: string, convertedValue: Big) {
|
||||
// Ctrl+click: adopt this tile's displayed value as the new inputValue and promote it to from-unit.
|
||||
// This is the "pivot" gesture.
|
||||
inputValue = parseFloat(convertedValue.toFixed(FRACTIONAL_DIGITS));
|
||||
|
||||
Reference in New Issue
Block a user