Skip to content

Commit

Permalink
[#noissue] fix: GlobalSearch, Inspector styles
Browse files Browse the repository at this point in the history
  • Loading branch information
BillionaireDY committed Jul 17, 2024
1 parent 2fc0d37 commit 058adbc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,11 @@ export const GlobalSearch = ({ services }: GlobalSearchProps) => {
return (
portalTargetElement &&
createPortal(
<CommandDialog open={open} onOpenChange={setOpen}>
<CommandDialog
open={open}
onOpenChange={setOpen}
dialogClassName="max-w-[40rem] data-[state=open]:!slide-in-from-top-[0%] data-[state=closed]:!slide-out-to-top-[0%] top-[15%] translate-y-0"
>
<Command
loop
filter={(value, search, keywords) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface InspectorChartProps extends ChartCoreProps {
export const InspectorChart = ({ data, children, ...props }: InspectorChartProps) => {
return (
<Card className="rounded-lg">
<CardHeader className="px-5 py-4">
<CardHeader className="px-4 py-3 text-sm">
<CardTitle>{data?.title}</CardTitle>
</CardHeader>
<Separator />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ export const SystemMetricChartFetcher = ({

return (
<Card className="rounded-lg">
<CardHeader className="px-5 py-4">
<CardHeader className="px-4 py-3 text-sm">
<CardTitle>{title}</CardTitle>
{tagGroup && (
<CardDescription className="flex items-center gap-2.5 !mt-3">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ const Command = React.forwardRef<
));
Command.displayName = CommandPrimitive.displayName;

interface CommandDialogProps extends DialogProps {}
interface CommandDialogProps extends DialogProps {
dialogClassName?: string;
}

const CommandDialog = ({ children, ...props }: CommandDialogProps) => {
const CommandDialog = ({ children, dialogClassName, ...props }: CommandDialogProps) => {
return (
<Dialog {...props}>
<DialogContent className="p-0 overflow-hidden">
<DialogContent className={cn('p-0 overflow-hidden', dialogClassName)}>
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
Expand Down

0 comments on commit 058adbc

Please sign in to comment.