Skip to content

feat(site): add stop and start batch actions #10565

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

Merged
merged 9 commits into from
Nov 8, 2023
Merged
Changes from 1 commit
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
Prev Previous commit
Fix fmt
  • Loading branch information
BrunoQuaresma committed Nov 7, 2023
commit 78aa58fe6ec88f8184768784b0161b9f11809160
5 changes: 4 additions & 1 deletion site/src/components/MoreMenu/MoreMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ const useMoreMenuContext = () => {
return ctx;
};

export const MoreMenuTrigger = ({ children, ...props }: HTMLProps<HTMLButtonElement>) => {
export const MoreMenuTrigger = ({
children,
...props
}: HTMLProps<HTMLButtonElement>) => {
const menu = useMoreMenuContext();

return cloneElement(children as ReactElement, {
Copy link
Member

Choose a reason for hiding this comment

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

Is this type-safe? My worry is that it looks like there's nothing restricting the type of children at the type level, so if someone accidentally passes in a string or a primitive as a prop, they would get a more cryptic runtime error

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I swear I tried my best to get a correct type for this without success :(

Expand Down