Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

Commit

Permalink
fix: add pullright
Browse files Browse the repository at this point in the history
Signed-off-by: fan-mengwen <fan.mengwen@xsky.com>
  • Loading branch information
fan-mengwen committed May 8, 2023
1 parent dfb1309 commit 272d5ce
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Dropdown/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ const defaultProps: DropdownDefaultProps = {
};

const Dropdown = (props: DropdownProps) => {
const { customToggle, className, id, title, children } = props;
const { customToggle, pullRight, className, id, title, children } = props;
const align = pullRight ? 'end' : undefined;
return (
<BootstrapDropdown id={id} className={className}>
<BootstrapDropdown id={id} className={className} align={align}>
{customToggle && title}
{!customToggle && title && <BootstrapDropdown.Toggle>{title}</BootstrapDropdown.Toggle>}
<BootstrapDropdown.Menu>{children}</BootstrapDropdown.Menu>
Expand Down

0 comments on commit 272d5ce

Please sign in to comment.