From 41afe8f18a81542e8fb7fc626500d79a03b886da Mon Sep 17 00:00:00 2001 From: Dean Sallinen <7519573+deansallinen@users.noreply.github.com> Date: Fri, 6 Dec 2024 14:45:33 -0800 Subject: [PATCH] refactor: description list component --- src/lib/components/descriptionlist.svelte | 25 -------- src/lib/components/descriptionlist/dd.svelte | 5 ++ src/lib/components/descriptionlist/dl.svelte | 10 ++- .../components/descriptionlist/dlrow.svelte | 21 +++++-- src/lib/components/descriptionlist/dt.svelte | 5 ++ src/lib/components/descriptionlist/index.ts | 2 + .../(account)/ram/(forms)/buy/+page.svelte | 62 +++++++++--------- .../(account)/ram/(forms)/sell/+page.svelte | 63 ++++++++++--------- .../staking/(staking)/stake/+page.svelte | 16 +++-- .../staking/(staking)/unstake/+page.svelte | 6 +- .../debug/components/sections/tables.svelte | 48 +++++++++++--- .../(explorer)/block/[number]/+page.svelte | 26 +++++--- 12 files changed, 170 insertions(+), 119 deletions(-) delete mode 100644 src/lib/components/descriptionlist.svelte create mode 100644 src/lib/components/descriptionlist/dd.svelte create mode 100644 src/lib/components/descriptionlist/dt.svelte diff --git a/src/lib/components/descriptionlist.svelte b/src/lib/components/descriptionlist.svelte deleted file mode 100644 index d8d06255..00000000 --- a/src/lib/components/descriptionlist.svelte +++ /dev/null @@ -1,25 +0,0 @@ - - -
- {m.common_labeled_unit_price({ - unit: `${context.network.chain.systemToken?.symbol.name}/RAM` - })} (KB) -
-{m.ram_to_purchase()}
-{m.ram_purchase_value()}
-{m.common_network_fees()} (0.5%)
-{m.common_total_cost()}
-- {m.common_labeled_unit_price({ - unit: `${context.network.chain.systemToken?.symbol.name}/RAM` - })} (KB) -
-{m.ram_to_sell()}
-{m.total_proceeds()}
-{m.common_network_fees()} (0.5%)
-{m.common_expected_receive()}
-+ For displaying a component in the description, or multiple values under a single key, you can + use the components declaratively. +
+ ++ Note: You need to wrap the child component correctly or you'll get a warning. There are CSS + rules that'll visually yell at you to fix it :) +
+