From 97b6de6aa437f7a913a33b9e6aa18a919faf2caf Mon Sep 17 00:00:00 2001 From: Wes Bos Date: Thu, 12 Apr 2018 16:31:01 -0400 Subject: a whole bunch of things that should be in their own commits --- frontend/components/Search.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'frontend/components/Search.js') diff --git a/frontend/components/Search.js b/frontend/components/Search.js index 49c5023..a1b69cb 100644 --- a/frontend/components/Search.js +++ b/frontend/components/Search.js @@ -1,6 +1,6 @@ import Downshift from 'downshift'; import Router from 'next/router'; -import styled from 'styled-components'; +import styled, { keyframes } from 'styled-components'; import debounce from 'lodash.debounce'; import { client } from '../lib/withData'; import { SEARCH_ITEMS_QUERY } from '../queries'; @@ -35,6 +35,15 @@ const DropDownItem = styled.div` } `; +const glow = keyframes` + from { + box-shadow: 0 0 0px yellow; + } + + to { + box-shadow: 0 0 10px 1px yellow; + } +`; const SearchStyles = styled.div` position: relative; input { @@ -43,7 +52,7 @@ const SearchStyles = styled.div` border: 0; font-size: 2rem; &.loading { - background: red; + animation: ${glow} 0.5s ease-in-out infinite alternate; } } `; -- cgit v1.3