Skip to content

Commit

Permalink
fix(ui): after review
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax committed Aug 19, 2024
1 parent 217f1b2 commit 656479e
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 16 deletions.
4 changes: 3 additions & 1 deletion packages/ui/src/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
actionType = 'default',
type = 'button',
priority = 'primary',
// needed for the Radix's `asChild` prop to work correctly
// https://www.radix-ui.com/primitives/docs/guides/composition#composing-with-your-own-react-components
...props
},
ref,
Expand All @@ -187,6 +189,7 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(

return (
<StyledButton
{...props}
{...asTransientProps({ iconOnly, density, actionType, priority })}
ref={ref}
type={type}
Expand All @@ -201,7 +204,6 @@ export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
? theme.borderRadius.sm
: theme.borderRadius.full
}
{...props}
>
{IconComponent && (
<IconComponent size={density === 'sparse' && iconOnly === true ? 24 : 16} />
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { ReactNode } from 'react';
import { Root as RadixDropdownMenuRoot } from '@radix-ui/react-dropdown-menu';
import { Trigger } from './trigger.tsx';
import { Content } from './content.tsx';
import { RadioGroup } from './radio-group.tsx';
import { RadioItem } from './radio-item.tsx';
import { CheckboxItem } from './checkbox-item.tsx';
import { Item } from './item.tsx';
import { Trigger } from './Trigger.tsx';
import { Content } from './Content.tsx';
import { RadioGroup } from './RadioGroup.tsx';
import { RadioItem } from './RadioItem.tsx';
import { CheckboxItem } from './CheckboxItem.tsx';
import { Item } from './Item.tsx';

interface ControlledDropdownMenuProps {
/**
Expand Down
File renamed without changes.
16 changes: 8 additions & 8 deletions packages/ui/src/DropdownMenu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export { DropdownMenu } from './root';
export { DropdownMenu } from './Root.tsx';

export type { DropdownMenuProps } from './root';
export type { DropdownMenuTriggerProps } from './trigger';
export type { DropdownMenuContentProps } from './content';
export type { DropdownMenuRadioGroupProps } from './radio-group';
export type { DropdownMenuRadioItemProps } from './radio-item';
export type { DropdownMenuCheckboxItemProps } from './checkbox-item';
export type { DropdownMenuItemProps } from './item';
export type { DropdownMenuProps } from './Root.tsx';
export type { DropdownMenuTriggerProps } from './Trigger.tsx';
export type { DropdownMenuContentProps } from './Content.tsx';
export type { DropdownMenuRadioGroupProps } from './RadioGroup.tsx';
export type { DropdownMenuRadioItemProps } from './RadioItem.tsx';
export type { DropdownMenuCheckboxItemProps } from './CheckboxItem.tsx';
export type { DropdownMenuItemProps } from './Item.tsx';
2 changes: 1 addition & 1 deletion packages/ui/src/utils/popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ export const PopoverContent = styled.div`
border-radius: ${props => props.theme.borderRadius.sm};
backdrop-filter: blur(${props => props.theme.blur.lg});
transform-origin: var(--radix-tooltip-content-transform-origin);
transform-origin: var(--radix-popper-transform-origin);
animation: ${scaleIn} 0.15s ease-out;
`;

0 comments on commit 656479e

Please sign in to comment.