diff --git a/src/assets/images/santa-hat.png b/src/assets/images/santa-hat.png new file mode 100644 index 0000000000..0615c0dd36 Binary files /dev/null and b/src/assets/images/santa-hat.png differ diff --git a/src/components/Header/HolidayOrnament.tsx b/src/components/Header/HolidayOrnament.tsx new file mode 100644 index 0000000000..028e66c422 --- /dev/null +++ b/src/components/Header/HolidayOrnament.tsx @@ -0,0 +1,26 @@ +import { ReactElement } from 'react' +import styled from 'styled-components/macro' + +import SantaHat from '../../assets/images/santa-hat.png' + +const SantaHatImage = styled.img` + position: absolute; + top: -4px; + right: -4px; + height: 18px; +` + +const Christmas = + +const DATE_TO_ORNAMENT: { [date: string]: ReactElement } = { + '12-24': Christmas, + '12-25': Christmas, +} + +const HolidayOrnament = () => { + // months in javascript are 0 indexed... + const today = `${new Date().getMonth() + 1}-${new Date().getDate()}` + return DATE_TO_ORNAMENT[today] || null +} + +export default HolidayOrnament diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index 20c9b59133..911b7154bb 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -21,6 +21,7 @@ import Menu from '../Menu' import Row from '../Row' import { Dots } from '../swap/styleds' import Web3Status from '../Web3Status' +import HolidayOrnament from './HolidayOrnament' import NetworkSelector from './NetworkSelector' const HeaderFrame = styled.div<{ showBackground: boolean }>` @@ -178,6 +179,8 @@ const UniIcon = styled.div` :hover { transform: rotate(-5deg); } + + position: relative; ` const activeClassName = 'ACTIVE' @@ -270,6 +273,7 @@ export default function Header() { <UniIcon> <Logo fill={darkMode ? white : black} width="24px" height="100%" title="logo" /> + <HolidayOrnament /> </UniIcon>