Added beta tag in email (#4098)

#4040 added beta tag
This commit is contained in:
Jeet Desai
2024-02-21 21:39:36 +05:30
committed by GitHub
parent 161d02620a
commit 15510c9fbe
9 changed files with 26 additions and 18 deletions

View File

@ -3,6 +3,7 @@ import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
import { Pill } from '@/ui/display/pill/components/Pill';
type TabProps = {
id: string;
@ -12,6 +13,7 @@ type TabProps = {
className?: string;
onClick?: () => void;
disabled?: boolean;
hasBetaPill?: boolean;
};
const StyledTab = styled.div<{ active?: boolean; disabled?: boolean }>`
@ -59,6 +61,7 @@ export const Tab = ({
onClick,
className,
disabled,
hasBetaPill,
}: TabProps) => {
const theme = useTheme();
return (
@ -72,6 +75,7 @@ export const Tab = ({
<StyledHover>
{Icon && <Icon size={theme.icon.size.md} />}
{title}
{hasBetaPill && <Pill label="Beta" />}
</StyledHover>
</StyledTab>
);

View File

@ -14,6 +14,7 @@ type SingleTabProps = {
id: string;
hide?: boolean;
disabled?: boolean;
hasBetaPill?: boolean;
};
type TabListProps = {
@ -59,6 +60,7 @@ export const TabList = ({ tabs, tabListId }: TabListProps) => {
setActiveTabId(tab.id);
}}
disabled={tab.disabled}
hasBetaPill={tab.hasBetaPill}
/>
))}
</StyledContainer>