Skip to content

Commit

Permalink
add beta badge
Browse files Browse the repository at this point in the history
  • Loading branch information
jekrch committed Jul 7, 2024
1 parent 57c4b6b commit 46782e7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
16 changes: 16 additions & 0 deletions src/components/BetaBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import classNames from 'classnames';
import React from 'react';

interface BetaBadgeProps {
className?: string;
}

const BetaBadge: React.FC<BetaBadgeProps> = (props: BetaBadgeProps) => {
return (
<span className={classNames("px-2 py-0.5 bg-blue-500 text-white text-xs font-semibold rounded-full", props.className)}>
Beta
</span>
);
};

export default BetaBadge;
15 changes: 12 additions & 3 deletions src/components/modals/config/AnalyzeTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ import { setActiveCategory, setShowComparison } from '../../../redux/actions';
import { getSourceCountryKey, getVoteTypeCodeFromOption, getVoteTypeOptionsByYear } from '../../../utilities/VoteUtil';
import TooltipHelp from '../../TooltipHelp';
import Checkbox from '../../Checkbox';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { faNewspaper } from '@fortawesome/free-solid-svg-icons';
import BetaBadge from '../../BetaBadge';
import classNames from 'classnames';

const AnalyzeTab: React.FC = () => {
const dispatch = useDispatch<any>();
Expand Down Expand Up @@ -167,9 +171,14 @@ const AnalyzeTab: React.FC = () => {

return (
<div className="mb-0">
<p className="relative mb-[1em] mt-2 text-sm">
Compare your current ranking with the Jury or Tele vote from each participating country
</p>
<div className="relative mb-[1em] mt-2 flex items-center">
<div className="flex justify-center items-center mr-3 ml-3">
<BetaBadge className="flex-shrink-0" />
</div>
<p className="text-sm mr-1">
Compare your current ranking with the Jury or Tele vote from each participating country
</p>
</div>
<div className="mt-5 mb-[1.5em]">
<div>
<Dropdown
Expand Down

0 comments on commit 46782e7

Please sign in to comment.