Skip to content
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

[#noissue] fix: GlobalSearch, Inspector styles #11263

Merged
merged 1 commit into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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