From a9762fcd03c9caa15411aeac0b444a47e8c3a5e1 Mon Sep 17 00:00:00 2001 From: Alexandre Asselin Date: Thu, 15 Feb 2024 11:59:14 -0500 Subject: [PATCH] add toolbar slot to toolbar --- .changeset/cyan-bobcats-mate.md | 6 ++++++ packages/components/src/toolbar/src/Toolbar.tsx | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 .changeset/cyan-bobcats-mate.md diff --git a/.changeset/cyan-bobcats-mate.md b/.changeset/cyan-bobcats-mate.md new file mode 100644 index 000000000..528815f8a --- /dev/null +++ b/.changeset/cyan-bobcats-mate.md @@ -0,0 +1,6 @@ +--- +"@orbit-ui/transition-components": patch +"@workleap/orbiter-ui": patch +--- + +Add slot "toolbar" to the toolbar component diff --git a/packages/components/src/toolbar/src/Toolbar.tsx b/packages/components/src/toolbar/src/Toolbar.tsx index ffc76f8e2..84b1ddd87 100644 --- a/packages/components/src/toolbar/src/Toolbar.tsx +++ b/packages/components/src/toolbar/src/Toolbar.tsx @@ -12,7 +12,8 @@ import { useFocusScope, useKeyboardNavigation, useMergedRefs, - useRovingFocus + useRovingFocus, + slot } from "../../shared"; import { ResponsiveProp, useResponsiveValue } from "../../styling"; import { ToolbarContext } from "./ToolbarContext"; @@ -147,8 +148,8 @@ InnerToolbar.defaultElement = DefaultElement; * * [Documentation](https://wl-orbiter-website.netlify.app//?path=/docs/toolbar--default-story) */ -export const Toolbar = forwardRef>((props, ref) => ( +export const Toolbar = slot("toolbar", forwardRef>((props, ref) => ( -)); +))); export type ToolbarProps = ComponentProps;