From 1cfbd86bd095444e6ae488efaea07e5895f46399 Mon Sep 17 00:00:00 2001 From: Austin Chen Date: Sat, 21 May 2022 15:48:47 -0700 Subject: [PATCH] Fix down triangle & padding --- web/components/contract/contract-card.tsx | 47 ++++++++++++----------- web/lib/icons/triangle-down-fill-icon.tsx | 17 ++++++++ web/lib/icons/triangle-icon.tsx | 13 ------- 3 files changed, 41 insertions(+), 36 deletions(-) create mode 100644 web/lib/icons/triangle-down-fill-icon.tsx delete mode 100644 web/lib/icons/triangle-icon.tsx diff --git a/web/components/contract/contract-card.tsx b/web/components/contract/contract-card.tsx index aab63ab0..bb19aad4 100644 --- a/web/components/contract/contract-card.tsx +++ b/web/components/contract/contract-card.tsx @@ -27,8 +27,8 @@ import { import { getOutcomeProbability, getTopAnswer } from 'common/calculate' import { AvatarDetails, MiscDetails } from './contract-details' import { getExpectedValue, getValueFromBucket } from 'common/calculate-dpm' -import TriangleIcon from 'web/lib/icons/triangle-icon' import TriangleFillIcon from 'web/lib/icons/triangle-fill-icon' +import TriangleDownFillIcon from 'web/lib/icons/triangle-down-fill-icon' // Return a number from 0 to 1 for this contract // Resolved contracts are set to 1, for coloring purposes (even if NO) @@ -94,7 +94,7 @@ export function ContractCard(props: {
@@ -126,22 +126,24 @@ export function ContractCard(props: { -
{ - // console.log('e', e) - }} - >
- {contract.createdTime % 3 == 0 ? ( - - ) : ( - - )} +
+
{ + // console.log('e', e) + }} + >
+ {contract.createdTime % 3 == 0 ? ( + + ) : ( + + )} +
{outcomeType === 'BINARY' && ( )} -
+
{ // console.log('e2', e) }} >
- {/* Note: Something about rotate-180 screws with the hitbox. Rotate the SVG instead. */} {contract.createdTime % 3 == 2 ? ( - ) : ( - + )}
diff --git a/web/lib/icons/triangle-down-fill-icon.tsx b/web/lib/icons/triangle-down-fill-icon.tsx new file mode 100644 index 00000000..28ed5ba6 --- /dev/null +++ b/web/lib/icons/triangle-down-fill-icon.tsx @@ -0,0 +1,17 @@ +// Icon from Bootstrap: https://icons.getbootstrap.com/ +export default function TriangleDownFillIcon(props: { className?: string }) { + return ( + + + + ) +} diff --git a/web/lib/icons/triangle-icon.tsx b/web/lib/icons/triangle-icon.tsx deleted file mode 100644 index 813808b7..00000000 --- a/web/lib/icons/triangle-icon.tsx +++ /dev/null @@ -1,13 +0,0 @@ -// Icon from Bootstrap: https://icons.getbootstrap.com/ -export default function TriangleIcon(props: { className?: string }) { - return ( - - - - ) -}