-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'next' into billing-age
- Loading branch information
Showing
12 changed files
with
246 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { cn } from '../../utils/ui'; | ||
|
||
export const Container = ({ children, className }: { children: React.ReactNode; className?: string }) => { | ||
return <div className={cn('mx-auto w-full max-w-[1152px] px-14 py-14', className)}>{children}</div>; | ||
}; |
24 changes: 24 additions & 0 deletions
24
apps/dashboard/src/components/primitives/help-tooltip-indicator.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { RiInformation2Line } from 'react-icons/ri'; | ||
import { Tooltip, TooltipContent, TooltipTrigger } from './tooltip'; | ||
import { cn } from '../../utils/ui'; | ||
|
||
interface HelpTooltipIndicatorProps { | ||
text: string; | ||
className?: string; | ||
size?: '4' | '5'; | ||
} | ||
|
||
export function HelpTooltipIndicator({ text, className, size = '5' }: HelpTooltipIndicatorProps) { | ||
return ( | ||
<Tooltip> | ||
<TooltipTrigger asChild> | ||
<span className={cn('text-foreground-400 hover:cursor inline-block', className)}> | ||
<RiInformation2Line className={`size-${size}`} /> | ||
</span> | ||
</TooltipTrigger> | ||
<TooltipContent> | ||
<p>{text}</p> | ||
</TooltipContent> | ||
</Tooltip> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,44 @@ | ||
import { RiExternalLinkLine } from 'react-icons/ri'; | ||
import { RiBookMarkedLine, RiExternalLinkLine, RiQuestionLine } from 'react-icons/ri'; | ||
import { cn } from '@/utils/ui'; | ||
import { useTelemetry } from '@/hooks/use-telemetry'; | ||
import { TelemetryEvent } from '@/utils/telemetry'; | ||
|
||
interface ExternalLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> { | ||
children: React.ReactNode; | ||
iconClassName?: string; | ||
variant?: 'default' | 'documentation' | 'tip'; | ||
} | ||
|
||
export function ExternalLink({ children, className, iconClassName, ...props }: ExternalLinkProps) { | ||
export function ExternalLink({ | ||
children, | ||
className, | ||
variant = 'default', | ||
iconClassName, | ||
href, | ||
...props | ||
}: ExternalLinkProps) { | ||
const telemetry = useTelemetry(); | ||
|
||
const handleClick = () => { | ||
telemetry(TelemetryEvent.EXTERNAL_LINK_CLICKED, { | ||
href, | ||
variant, | ||
}); | ||
}; | ||
|
||
return ( | ||
<a | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className={cn('inline-flex items-center gap-1 hover:underline', className)} | ||
className={cn('text-foreground-600 inline-flex items-center gap-1 hover:underline', className)} | ||
href={href} | ||
onClick={handleClick} | ||
{...props} | ||
> | ||
{variant === 'documentation' && <RiBookMarkedLine className={cn('size-4', iconClassName)} aria-hidden="true" />} | ||
{variant === 'default' && <RiExternalLinkLine className={cn('size-4', iconClassName)} aria-hidden="true" />} | ||
{variant === 'tip' && <RiQuestionLine className={cn('size-4', iconClassName)} aria-hidden="true" />} | ||
{children} | ||
<RiExternalLinkLine className={cn('size-4', iconClassName)} aria-hidden="true" /> | ||
</a> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.