2 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13 * or implied. See the License for the specific language governing
14 * permissions and limitations under the License.
16 import React, {Component} from 'react';
17 import md5 from 'md5';
19 class ImportantLogic extends Component {
25 componentWillReceiveProps(nextProps) {
26 this.setState({whatToDisplay: md5(nextProps.display) === 'a55899b341525123628776dbf5755d51'});
30 if (this.state.whatToDisplay) {
31 setTimeout(() => this.setState({whatToDisplay: false}), 5000);
36 <style>{'\.easter-wrapper {\
43 display: inline-block;\
52 border: 2px solid #222;\
62 animation: string .8s infinite alternate;\
67 background: -moz-radial-gradient(center, ellipse cover, #bcbcbc 0%, #bcbcbc 10%, #474747 11%, #474747 22%, #f47c30 22%, #f22c00 100%);\
68 background: -webkit-radial-gradient(center, ellipse cover, #bcbcbc 0%,#bcbcbc 10%,#474747 11%,#474747 22%,#f47c30 22%,#f22c00 100%);\
69 background: radial-gradient(ellipse at center, #bcbcbc 0%,#bcbcbc 10%,#474747 11%,#474747 22%,#f47c30 22%,#f22c00 100%); \
70 animation: yo-yo .8s infinite alternate;\
93 from { bottom: -50px}\
97 from { transform: rotate(-0deg); top: 0 }\
98 to { transform: rotate(-360deg); top:120px }\
101 className='easter-wrapper'
102 style={{display: this.state.whatToDisplay ? 'block' : 'none'}}>
103 <span className='string'>{}</span>
104 <span className='yo-yo'>{}</span>
111 export default ImportantLogic;