@ -4,7 +4,7 @@ import styled from '@emotion/styled';
|
|||||||
|
|
||||||
import { IconChevronRight } from '@/ui/display/icon';
|
import { IconChevronRight } from '@/ui/display/icon';
|
||||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||||
import { SoonPill } from '@/ui/display/pill/components/SoonPill';
|
import { Pill } from '@/ui/display/pill/components/Pill';
|
||||||
import { Card } from '@/ui/layout/card/components/Card';
|
import { Card } from '@/ui/layout/card/components/Card';
|
||||||
import { CardContent } from '@/ui/layout/card/components/CardContent';
|
import { CardContent } from '@/ui/layout/card/components/CardContent';
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ export const SettingsNavigationCard = ({
|
|||||||
<Icon size={theme.icon.size.lg} stroke={theme.icon.stroke.sm} />
|
<Icon size={theme.icon.size.lg} stroke={theme.icon.stroke.sm} />
|
||||||
<StyledTitle disabled={disabled}>
|
<StyledTitle disabled={disabled}>
|
||||||
{title}
|
{title}
|
||||||
{soon && <SoonPill />}
|
{soon && <Pill label="Soon" />}
|
||||||
</StyledTitle>
|
</StyledTitle>
|
||||||
<StyledIconChevronRight size={theme.icon.size.sm} />
|
<StyledIconChevronRight size={theme.icon.size.sm} />
|
||||||
</StyledHeader>
|
</StyledHeader>
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
type SoonPillProps = {
|
type PillProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
|
label?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const StyledSoonPill = styled.span`
|
const StyledPill = styled.span`
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background: ${({ theme }) => theme.background.transparent.light};
|
background: ${({ theme }) => theme.background.transparent.light};
|
||||||
border-radius: ${({ theme }) => theme.border.radius.pill};
|
border-radius: ${({ theme }) => theme.border.radius.pill};
|
||||||
@ -20,6 +21,6 @@ const StyledSoonPill = styled.span`
|
|||||||
padding: ${({ theme }) => `0 ${theme.spacing(2)}`};
|
padding: ${({ theme }) => `0 ${theme.spacing(2)}`};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export const SoonPill = ({ className }: SoonPillProps) => (
|
export const Pill = ({ className, label }: PillProps) => (
|
||||||
<StyledSoonPill className={className}>Soon</StyledSoonPill>
|
<StyledPill className={className}>{label}</StyledPill>
|
||||||
);
|
);
|
||||||
@ -2,15 +2,15 @@ import { Meta, StoryObj } from '@storybook/react';
|
|||||||
|
|
||||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||||
|
|
||||||
import { SoonPill } from '../SoonPill';
|
import { Pill } from '../Pill';
|
||||||
|
|
||||||
const meta: Meta<typeof SoonPill> = {
|
const meta: Meta<typeof Pill> = {
|
||||||
title: 'UI/Display/Pill/SoonPill',
|
title: 'UI/Display/Pill/Pill',
|
||||||
component: SoonPill,
|
component: Pill,
|
||||||
decorators: [ComponentDecorator],
|
decorators: [ComponentDecorator],
|
||||||
};
|
};
|
||||||
|
|
||||||
export default meta;
|
export default meta;
|
||||||
type Story = StoryObj<typeof SoonPill>;
|
type Story = StoryObj<typeof Pill>;
|
||||||
|
|
||||||
export const Default: Story = {};
|
export const Default: Story = {};
|
||||||
@ -3,7 +3,7 @@ import { css, useTheme } from '@emotion/react';
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||||
import { SoonPill } from '@/ui/display/pill/components/SoonPill';
|
import { Pill } from '@/ui/display/pill/components/Pill';
|
||||||
|
|
||||||
export type ButtonSize = 'medium' | 'small';
|
export type ButtonSize = 'medium' | 'small';
|
||||||
export type ButtonPosition = 'standalone' | 'left' | 'middle' | 'right';
|
export type ButtonPosition = 'standalone' | 'left' | 'middle' | 'right';
|
||||||
@ -251,7 +251,7 @@ const StyledButton = styled.button<
|
|||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledSoonPill = styled(SoonPill)`
|
const StyledSoonPill = styled(Pill)`
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -285,7 +285,7 @@ export const Button = ({
|
|||||||
>
|
>
|
||||||
{Icon && <Icon size={theme.icon.size.sm} />}
|
{Icon && <Icon size={theme.icon.size.sm} />}
|
||||||
{title}
|
{title}
|
||||||
{soon && <StyledSoonPill />}
|
{soon && <StyledSoonPill label="Soon" />}
|
||||||
</StyledButton>
|
</StyledButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@ -104,6 +104,7 @@ export const ShowPageRightContainer = ({
|
|||||||
Icon: IconMail,
|
Icon: IconMail,
|
||||||
hide: !shouldDisplayEmailsTab,
|
hide: !shouldDisplayEmailsTab,
|
||||||
disabled: !isMessagingEnabled,
|
disabled: !isMessagingEnabled,
|
||||||
|
hasBetaPill: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { useTheme } from '@emotion/react';
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
import { IconComponent } from '@/ui/display/icon/types/IconComponent';
|
||||||
|
import { Pill } from '@/ui/display/pill/components/Pill';
|
||||||
|
|
||||||
type TabProps = {
|
type TabProps = {
|
||||||
id: string;
|
id: string;
|
||||||
@ -12,6 +13,7 @@ type TabProps = {
|
|||||||
className?: string;
|
className?: string;
|
||||||
onClick?: () => void;
|
onClick?: () => void;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
hasBetaPill?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
const StyledTab = styled.div<{ active?: boolean; disabled?: boolean }>`
|
const StyledTab = styled.div<{ active?: boolean; disabled?: boolean }>`
|
||||||
@ -59,6 +61,7 @@ export const Tab = ({
|
|||||||
onClick,
|
onClick,
|
||||||
className,
|
className,
|
||||||
disabled,
|
disabled,
|
||||||
|
hasBetaPill,
|
||||||
}: TabProps) => {
|
}: TabProps) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
return (
|
return (
|
||||||
@ -72,6 +75,7 @@ export const Tab = ({
|
|||||||
<StyledHover>
|
<StyledHover>
|
||||||
{Icon && <Icon size={theme.icon.size.md} />}
|
{Icon && <Icon size={theme.icon.size.md} />}
|
||||||
{title}
|
{title}
|
||||||
|
{hasBetaPill && <Pill label="Beta" />}
|
||||||
</StyledHover>
|
</StyledHover>
|
||||||
</StyledTab>
|
</StyledTab>
|
||||||
);
|
);
|
||||||
|
|||||||
@ -14,6 +14,7 @@ type SingleTabProps = {
|
|||||||
id: string;
|
id: string;
|
||||||
hide?: boolean;
|
hide?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
hasBetaPill?: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
type TabListProps = {
|
type TabListProps = {
|
||||||
@ -59,6 +60,7 @@ export const TabList = ({ tabs, tabListId }: TabListProps) => {
|
|||||||
setActiveTabId(tab.id);
|
setActiveTabId(tab.id);
|
||||||
}}
|
}}
|
||||||
disabled={tab.disabled}
|
disabled={tab.disabled}
|
||||||
|
hasBetaPill={tab.hasBetaPill}
|
||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</StyledContainer>
|
</StyledContainer>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import styled from '@emotion/styled';
|
import styled from '@emotion/styled';
|
||||||
|
|
||||||
import { IconArrowUpRight, IconBolt } from '@/ui/display/icon';
|
import { IconArrowUpRight, IconBolt } from '@/ui/display/icon';
|
||||||
import { SoonPill } from '@/ui/display/pill/components/SoonPill';
|
import { Pill } from '@/ui/display/pill/components/Pill';
|
||||||
import { Button } from '@/ui/input/button/components/Button';
|
import { Button } from '@/ui/input/button/components/Button';
|
||||||
import { SettingsIntegration } from '~/pages/settings/integrations/types/SettingsIntegration';
|
import { SettingsIntegration } from '~/pages/settings/integrations/types/SettingsIntegration';
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ const StyledIntegrationLogo = styled.div`
|
|||||||
color: ${({ theme }) => theme.border.color.strong};
|
color: ${({ theme }) => theme.border.color.strong};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledSoonPill = styled(SoonPill)`
|
const StyledSoonPill = styled(Pill)`
|
||||||
padding: ${({ theme }) => theme.spacing(1)} ${({ theme }) => theme.spacing(2)};
|
padding: ${({ theme }) => theme.spacing(1)} ${({ theme }) => theme.spacing(2)};
|
||||||
`;
|
`;
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ export const SettingsIntegrationComponent = ({
|
|||||||
{integration.text}
|
{integration.text}
|
||||||
</StyledSection>
|
</StyledSection>
|
||||||
{integration.type === 'Soon' ? (
|
{integration.type === 'Soon' ? (
|
||||||
<StyledSoonPill />
|
<StyledSoonPill label="Soon" />
|
||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
onClick={() => openLinkInTab(integration.link)}
|
onClick={() => openLinkInTab(integration.link)}
|
||||||
|
|||||||
@ -14,7 +14,7 @@ export * from './src/modules/ui/display/checkmark/components/AnimatedCheckmark'
|
|||||||
export * from './src/modules/ui/display/chip/components/Chip'
|
export * from './src/modules/ui/display/chip/components/Chip'
|
||||||
export * from './src/modules/ui/display/chip/components/EntityChip'
|
export * from './src/modules/ui/display/chip/components/EntityChip'
|
||||||
export * from './src/modules/ui/display/icon/components/IconAddressBook'
|
export * from './src/modules/ui/display/icon/components/IconAddressBook'
|
||||||
export * from './src/modules/ui/display/pill/components/SoonPill'
|
export * from './src/modules/ui/display/pill/components/Pill'
|
||||||
export * from './src/modules/ui/display/tag/components/Tag'
|
export * from './src/modules/ui/display/tag/components/Tag'
|
||||||
export * from './src/modules/ui/display/tooltip/AppTooltip'
|
export * from './src/modules/ui/display/tooltip/AppTooltip'
|
||||||
export * from './src/modules/ui/display/tooltip/OverflowingTextWithTooltip'
|
export * from './src/modules/ui/display/tooltip/OverflowingTextWithTooltip'
|
||||||
|
|||||||
Reference in New Issue
Block a user