Skip to content

Commit

Permalink
Blinking the Pro button for basic version.
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoder committed Sep 21, 2020
1 parent b5564a0 commit 444a159
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
10 changes: 10 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -1887,3 +1887,13 @@ ol.editor-nav li {
.cheat-sheet tr>td, .cheat-sheet tr>th {
padding: 10px 5px;
}

.prod-version.basic {
animation: blinker 1s linear infinite;
}

@keyframes blinker {
50% {
opacity: 0;
}
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
const ProductVersionLabelAbstract = ({ tooltip, style, clickHandler }) => {
const ProductVersionLabelAbstract = ({ className, tooltip, style, clickHandler }) => {
const styleTemplate = {
padding: '1px 15px 1px 15px'
};

const mergedStyle = {...styleTemplate, ...style};

const classNames = "prod-version btn flex flex-v-center hint--rounded hint--bottom-left" + " " + className
return (
<i style={mergedStyle}
className="btn flex flex-v-center hint--rounded hint--bottom-left"
className={classNames}
aria-label={tooltip} onClick={clickHandler}
>Pro</i>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ProductVersionLabelBasic = ({ tooltip, clickHandler }) => {
const style = {
'background-color': 'grey'
};
return <ProductVersionLabelAbstract tooltip={tooltip} clickHandler={clickHandler} style={style} />
return <ProductVersionLabelAbstract className="basic" tooltip={tooltip} clickHandler={clickHandler} style={style} />
};

export { ProductVersionLabelBasic };
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const ProductVersionLabelProfessional = ({ clickHandler }) => {
color: 'white'
};

return <ProductVersionLabelAbstract clickHandler={clickHandler} style={style} tooltip="Thanks for your support" />
return <ProductVersionLabelAbstract className="pro" clickHandler={clickHandler} style={style} tooltip="Thanks for your support" />
};

export { ProductVersionLabelProfessional };

0 comments on commit 444a159

Please sign in to comment.