From 367de9678b4e659cb70109ef84b10210b836caff Mon Sep 17 00:00:00 2001 From: Phil Bain Date: Wed, 13 Oct 2021 16:36:36 -0600 Subject: [PATCH] use theme colors in spite of @reach styling nonsense use dai-ui icon component and move svg to theme --- lib/theme.js | 31 ++++++++++ modules/app/components/Icon/index.tsx | 31 ---------- .../executive/components/SpellEffectsTab.tsx | 62 ++++++++----------- 3 files changed, 56 insertions(+), 68 deletions(-) diff --git a/lib/theme.js b/lib/theme.js index 9c04749e0..dc8d49634 100644 --- a/lib/theme.js +++ b/lib/theme.js @@ -999,6 +999,37 @@ export default { fill="currentColor" /> ) + }, + hourglass: { + viewBox: '0 0 14 18', + path: ( + + + + + + + ) } } }; diff --git a/modules/app/components/Icon/index.tsx b/modules/app/components/Icon/index.tsx index 31cd13968..53567ae96 100644 --- a/modules/app/components/Icon/index.tsx +++ b/modules/app/components/Icon/index.tsx @@ -34,37 +34,6 @@ const icons = { ), viewBox: '0 0 15 15' - }, - hourglass: { - path: ( - - - - - - - ), - viewBox: '0 0 14 18' } }; diff --git a/modules/executive/components/SpellEffectsTab.tsx b/modules/executive/components/SpellEffectsTab.tsx index 26dd705a5..e9821f185 100644 --- a/modules/executive/components/SpellEffectsTab.tsx +++ b/modules/executive/components/SpellEffectsTab.tsx @@ -4,11 +4,27 @@ import { Box, Flex, Text, jsx, Link as ThemeUILink } from 'theme-ui'; import { Proposal, SpellData } from '../types'; import { useState } from 'react'; import { Icon as DaiUIIcon } from '@makerdao/dai-ui-icons'; -import Icon from 'modules/app/components/Icon'; import SkeletonThemed from 'modules/app/components/SkeletonThemed'; import { formatDateWithoutTime } from 'lib/datetime'; +const CircleIcon = ({ name }) => ( + ({ + background: theme.colors?.background, + borderRadius: '100%', + width: '34px', + minWidth: '34px', + height: '34px', + alignItems: 'center', + justifyContent: 'center' + })} + > + + +); + export function SpellEffectsTab({ proposal, spellData @@ -54,7 +70,7 @@ export function SpellEffectsTab({ mb: 4 }} > - Spell details + Spell Details ({ + background: theme.colors?.background, p: 3, transition: 'all 300ms linear', overflow: 'hidden', borderRadius: '3px' - }} + })} > - This hash allows for manually verifying that the Spell belongs to the correct Executive + This hash allows for manually verifying that the spell belongs to the correct Executive Proposal. It can be reproduced by hashing the raw markdown text of this Executive Proposal. The hash, the URL to the raw markdown text, and the correct hashing algorithm are all - registered on the blockchain in the Spell smart contract. + registered on the blockchain in the spell smart contract. - - - + {spellData?.officeHours && ( - - - +