Skip to content

Commit

Permalink
Merge pull request #82 from gsoft-inc/feature/toolbar_fix
Browse files Browse the repository at this point in the history
add toolbar slot to toolbar
  • Loading branch information
alexasselin008 authored Feb 15, 2024
2 parents 18322c9 + a9762fc commit 3aec9a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/cyan-bobcats-mate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@orbit-ui/transition-components": patch
"@workleap/orbiter-ui": patch
---

Add slot "toolbar" to the toolbar component
7 changes: 4 additions & 3 deletions packages/components/src/toolbar/src/Toolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
useFocusScope,
useKeyboardNavigation,
useMergedRefs,
useRovingFocus
useRovingFocus,
slot
} from "../../shared";
import { ResponsiveProp, useResponsiveValue } from "../../styling";
import { ToolbarContext } from "./ToolbarContext";
Expand Down Expand Up @@ -147,8 +148,8 @@ InnerToolbar.defaultElement = DefaultElement;
*
* [Documentation](https://wl-orbiter-website.netlify.app//?path=/docs/toolbar--default-story)
*/
export const Toolbar = forwardRef<any, OmitInternalProps<InnerToolbarProps>>((props, ref) => (
export const Toolbar = slot("toolbar", forwardRef<any, OmitInternalProps<InnerToolbarProps>>((props, ref) => (
<InnerToolbar {...props} forwardedRef={ref} />
));
)));

export type ToolbarProps = ComponentProps<typeof Toolbar>;

0 comments on commit 3aec9a4

Please sign in to comment.