-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changed timestamp from age to date (#596)
* Changed timestamp from age to date * Showing relative date consistantly * Added relative date to transaction row * Removed second comp prop * Added tooltip on dates * Forgot about this file
- Loading branch information
Showing
15 changed files
with
216 additions
and
38 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
packages/taraxa-ui/src/components/BaseTooltip/BaseTooltip.css
This file contains 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,42 @@ | ||
.has-tooltip { | ||
/*position: relative;*/ | ||
display: inline; | ||
} | ||
.tooltip-wrapper { | ||
position: absolute; | ||
visibility: hidden; | ||
} | ||
.has-tooltip:hover .tooltip-wrapper { | ||
visibility: visible; | ||
opacity: 0.7; | ||
/*top: 30px;*/ | ||
/*left: 50%;*/ | ||
/*margin-left: -76px;*/ | ||
/* z-index: 999; defined above with value of 5 */ | ||
} | ||
|
||
.tooltip { | ||
display: block; | ||
position: relative; | ||
top: 2em; | ||
right: 100%; | ||
/*margin-left: -76px;*/ | ||
color: #ffffff; | ||
background: #000000; | ||
text-align: center; | ||
border-radius: 3px; | ||
padding: 5px; | ||
font-size: 12px; | ||
} | ||
.tooltip:after { | ||
content: ''; | ||
position: absolute; | ||
bottom: 100%; | ||
left: 50%; | ||
margin-left: -8px; | ||
width: 0; | ||
height: 0; | ||
border-bottom: 8px solid #000000; | ||
border-right: 8px solid transparent; | ||
border-left: 8px solid transparent; | ||
} |
18 changes: 18 additions & 0 deletions
18
packages/taraxa-ui/src/components/BaseTooltip/BaseTooltip.tsx
This file contains 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,18 @@ | ||
import React, { ReactNode } from 'react'; | ||
import './BaseTooltip.css'; | ||
|
||
interface BaseTooltipProps { | ||
text: string; | ||
children: ReactNode; | ||
} | ||
|
||
export const BaseTooltip: React.FC<BaseTooltipProps> = ({ text, children }) => { | ||
return ( | ||
<div className='has-tooltip'> | ||
{children} | ||
<span className='tooltip-wrapper'> | ||
<span className='tooltip'>{text}</span> | ||
</span> | ||
</div> | ||
); | ||
}; |
This file contains 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 @@ | ||
export * from './BaseTooltip'; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.