-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[Insight] Refactored Tx Data with Boxes and Underlines #3929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
206ce69
created outline box with label within lines for transactions details
MicahMaphet 71ef164
made box aligns around inner text
MicahMaphet dfcce6f
put components inside of border labeled boxes
MicahMaphet 093f428
redid border box with field set
MicahMaphet 019a4f1
box taked minimum room
MicahMaphet a47f52f
made transaction input and output columns use all space
MicahMaphet 68ae9cf
refactored element structure for tx details, improving spacing, paddi…
MicahMaphet 5e0c47e
added text wrapping for tx data elements; put Tx Index and Confirmati…
MicahMaphet 9bf501c
fixed hover for address and Unparsed address+OP_RETURN spacing
MicahMaphet 8085f6a
Merge branch 'spent-arrow' into border-box-label
MicahMaphet 4f6f9dd
added circle placeholder to unspendable txs
MicahMaphet 905dbf0
added back fit content to border box
MicahMaphet fbe97eb
removed quotes around 0
MicahMaphet c43faff
added automatic margin removal to BorderBoxLabel children for more co…
MicahMaphet 52fd794
Tx id link expands down when details are expanded
MicahMaphet d0f4cd4
Merge branch 'master' into border-box-label
MicahMaphet 8c108eb
moved border box to new file and renamed it data box
MicahMaphet 8e9e96d
changed blue arrow color and show pointer only when the tx is spent
MicahMaphet 11ccd21
put data box label around OP RETURN
MicahMaphet f535c71
fixed spacing of side-by-side detail elements
MicahMaphet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {Children, FC, ReactNode} from "react"; | ||
import {useTheme} from "styled-components"; | ||
|
||
const DataBox: FC<{children: ReactNode, label: string}> = ({children, label}) => { | ||
const theme = useTheme(); | ||
const modifiedChildren = typeof children === 'object' | ||
? Children.map(children as JSX.Element, (child: JSX.Element) => { | ||
return <span {...child.props} style={{margin: 0}}></span>; | ||
}) | ||
: children; | ||
|
||
return ( | ||
<fieldset style={{ | ||
border: `1.5px solid ${theme.dark ? '#5f5f5f' : '#ccc'}`, | ||
borderRadius: '5px', | ||
padding: '0.1rem 0.4rem', | ||
wordBreak: 'break-all', | ||
whiteSpace: 'normal', | ||
width: 'fit-content', | ||
height: 'fit-content' | ||
}}> | ||
<legend style={{margin: '-0.2rem 0.1rem'}}>{label}</legend> | ||
{modifiedChildren} | ||
</fieldset> | ||
); | ||
} | ||
|
||
export default DataBox; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.