Skip to content

Commit

Permalink
fix: tiny screen cmdk size
Browse files Browse the repository at this point in the history
  • Loading branch information
iCrawl committed Sep 9, 2022
1 parent d11edc6 commit 7a9e52e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
5 changes: 3 additions & 2 deletions packages/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@
"private": true,
"scripts": {
"test": "vitest run",
"build:local": "NEXT_PUBLIC_LOCAL_DEV=true yarn build:prod",
"build:prod": "yarn run --top-level build && yarn run --top-level docs --force && yarn build:css && yarn build:next && yarn node scripts/generateAllIndicies.js",
"build:local": "NEXT_PUBLIC_LOCAL_DEV=true yarn run --top-level docs --force && yarn build:prod",
"build:prod": "yarn workspace @discordjs/api-extractor-utils run build && yarn workspace @discordjs/scripts run build && yarn build:css && yarn build:next",
"build:next": "next build",
"build:css": "yarn generate:css",
"build:search_indicies": "yarn node scripts/generateAllIndicies.js",
"dev": "yarn run --top-level docs && concurrently 'yarn dev:css' 'yarn dev:next'",
"dev:next": "next dev",
"dev:css": "yarn generate:css --watch",
Expand Down
2 changes: 1 addition & 1 deletion packages/website/src/components/Cmdk.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export function CmdkDialog() {

return (
<Dialog className="fixed top-1/4 left-1/2 z-50 -translate-x-1/2" state={dialog}>
<Command label="Command Menu" className="bg-dark-300 w-lg rounded">
<Command label="Command Menu" className="bg-dark-300 min-w-xs sm:min-w-lg rounded">
<Command.Input
className="bg-dark-300 caret-blurple mt-4 w-full border-0 p-4 pt-0 text-lg outline-0"
placeholder="Type to search..."
Expand Down
10 changes: 7 additions & 3 deletions packages/website/src/contexts/member.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ import { createContext, useContext, type ReactNode } from 'react';

export const MemberContext = createContext<ApiItemJSON | undefined>(undefined);

export const MemberProvider = ({ member, children }: { children: ReactNode; member: ApiItemJSON | undefined }) => (
<MemberContext.Provider value={member}>{children}</MemberContext.Provider>
);
export const MemberProvider = ({
member,
children,
}: {
children?: ReactNode | undefined;
member: ApiItemJSON | undefined;
}) => <MemberContext.Provider value={member}>{children}</MemberContext.Provider>;

export function useMember() {
return useContext(MemberContext);
Expand Down

1 comment on commit 7a9e52e

@vercel
Copy link

@vercel vercel bot commented on 7a9e52e Sep 9, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.