Skip to content

Commit

Permalink
add toolbar slot to toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
alexasselin008 committed Feb 15, 2024
1 parent 18322c9 commit a9762fc
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 a9762fc

Please sign in to comment.