From 4b6e6f194b12731a3ed8bbbb05cb708eb7d20515 Mon Sep 17 00:00:00 2001 From: Kata Date: Thu, 21 Mar 2019 03:17:50 -0500 Subject: [PATCH] add tooltip --- ui/components/tooltip.js | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 ui/components/tooltip.js diff --git a/ui/components/tooltip.js b/ui/components/tooltip.js new file mode 100644 index 0000000..89ea68d --- /dev/null +++ b/ui/components/tooltip.js @@ -0,0 +1,22 @@ +import styled from 'styled-components' +import MediaQuery from '../kit/media' + +export default styled.div` + position: absolute; + bottom: 35px; + font-size: 0.9em; + background-color: rgba(0,0,0,0.50); + padding: 5px; + color: var(--c-red); + border-radius: 3px; + border: 1px black solid; + z-index: 10; + opacity: 0.99; + overflow: auto; + pointer-events: none; + /* max-width: 50vw; */ + white-space: normal; + ${() => MediaQuery({ md: ` + white-space: nowrap; ` + })} +`