-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
style(dashboard): improve keys page design and look and feel #7236
Changes from 4 commits
8bd4fca
984f841
84b4d5b
bc7dd4a
1ff7016
d94d785
3859087
0acb870
4a5fd89
16243a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,11 @@ Card.displayName = 'Card'; | |
|
||
const CardHeader = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>( | ||
({ className, ...props }, ref) => ( | ||
<div ref={ref} className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} /> | ||
<div | ||
ref={ref} | ||
className={cn('flex flex-col space-y-1.5 bg-neutral-50 p-4 text-sm font-medium', className)} | ||
{...props} | ||
/> | ||
Comment on lines
+12
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated card bg to reflect design system |
||
) | ||
); | ||
CardHeader.displayName = 'CardHeader'; | ||
|
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>; | ||
}; | ||
Comment on lines
+3
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a reusable container at 1152px width There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. to me feels like to generic component with very specific CSS 😅 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The goal for this one is to be consistent across all pages that needs to use the container width. This is the first page to need it |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🥳 |
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> | ||
); | ||
} | ||
Comment on lines
+11
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This can be used to easily embed help tooltips |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { ReactNode } from 'react'; | ||
import { Card, CardContent, CardHeader } from '@/components/primitives/card'; | ||
|
||
interface SettingSectionProps { | ||
title: string; | ||
description?: string; | ||
children: ReactNode; | ||
} | ||
|
||
export function SettingSection({ title, description, children }: SettingSectionProps) { | ||
return ( | ||
<Card className="w-full overflow-hidden shadow-none"> | ||
<CardHeader> | ||
{title} | ||
{description && <p className="text-foreground-600 mt-1 text-xs">{description}</p>} | ||
</CardHeader> | ||
|
||
<CardContent className="rounded-b-xl border-t bg-neutral-50 bg-white p-3"> | ||
<div className="space-y-4 p-3">{children}</div> | ||
</CardContent> | ||
</Card> | ||
); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
import { RiExternalLinkLine } from 'react-icons/ri'; | ||
import { RiBookMarkedLine, RiBookmarkLine, RiExternalLinkLine } from 'react-icons/ri'; | ||
import { cn } from '@/utils/ui'; | ||
|
||
interface ExternalLinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> { | ||
children: React.ReactNode; | ||
iconClassName?: string; | ||
variant?: 'default' | 'documentation'; | ||
} | ||
|
||
export function ExternalLink({ children, className, iconClassName, ...props }: ExternalLinkProps) { | ||
export function ExternalLink({ children, className, variant = 'default', iconClassName, ...props }: ExternalLinkProps) { | ||
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)} | ||
{...props} | ||
> | ||
{variant === 'documentation' && <RiBookMarkedLine className={cn('size-4', iconClassName)} aria-hidden="true" />} | ||
{variant === 'default' && <RiExternalLinkLine className={cn('size-4', iconClassName)} aria-hidden="true" />} | ||
|
||
{children} | ||
<RiExternalLinkLine className={cn('size-4', iconClassName)} aria-hidden="true" /> | ||
</a> | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the color to match Figma designs of the bottom border