From 92e4c106da89d58430cc5bdf218b30ccb538acb9 Mon Sep 17 00:00:00 2001 From: Tilman Frick Date: Thu, 14 Dec 2017 14:07:42 +0100 Subject: [PATCH] feat(lsg): add hover state to element --- src/lsg/patterns/element/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lsg/patterns/element/index.tsx b/src/lsg/patterns/element/index.tsx index 2fc07b19c..6cff72103 100644 --- a/src/lsg/patterns/element/index.tsx +++ b/src/lsg/patterns/element/index.tsx @@ -44,6 +44,7 @@ export interface StyledPlaceholder { const StyledElement = styled.div` cursor: default; + position: relative; `; const StyledElementLabel = styled.div` @@ -56,11 +57,20 @@ const StyledElementLabel = styled.div` color: ${colors.black.toString()}; position: relative; + &:hover { + background: ${colors.grey90.toString()}; + } + + ${(props: StyledElementLabelProps) => props.active ? ` color: ${colors.white.toString()}; background: ${colors.blue.toString()}; + + &:hover { + background: ${colors.blue.toString()}; + } ` : ''}; ${(props: StyledElementLabelProps) =>