-
Notifications
You must be signed in to change notification settings - Fork 953
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CarbonIntensitySquare and CircularGauge with tooltip (#7127)
* WIP: CarbonIntensitySquare and CircularGuage with tooltip * format * use visx/text directly * tweak styles * set up translation strucutre * run script to remove the unused translations * add eng translatuons for other tooltips * put co2eq/kwh inside the square * Update web/src/components/CircularGauge.tsx Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com> * Update web/src/components/CircularGauge.tsx Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com> * inline tooltips * update tooltip strings * adjust info position * add spacing 15 to tailwind * optimize styles --------- Co-authored-by: Mads Nedergaard <nedergaardmads@gmail.com>
- Loading branch information
1 parent
7a53164
commit bff9c72
Showing
47 changed files
with
502 additions
and
856 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Info } from 'lucide-react'; | ||
|
||
/** This component is only meant to be used with `CarbonIntensitySquare` and `CircularGauge` | ||
* components. | ||
*/ | ||
export default function InfoIconWithPadding() { | ||
return ( | ||
<div className="absolute top-15 rounded-full bg-zinc-50 dark:bg-gray-900"> | ||
<Info size={28} className="p-1 text-brand-green dark:text-brand-green-dark" /> | ||
</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
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.