+) => {
+ return (
+
+ {children}
+
+ );
+};
diff --git a/packages/teams-components/src/components/SplitButton/validateProps.ts b/packages/teams-components/src/components/SplitButton/validateProps.ts
new file mode 100644
index 00000000..d436c84f
--- /dev/null
+++ b/packages/teams-components/src/components/SplitButton/validateProps.ts
@@ -0,0 +1,40 @@
+export const validateTitleProps = (props: {
+ title?: unknown;
+ menuTitle?: unknown;
+}) => {
+ if (props.menuTitle && !props.title) {
+ throw new Error(
+ '@fluentui-contrib/teams-components::SplitButton with menuTitle present, title must also be provided'
+ );
+ }
+};
+
+export const validateSplitIconButton = (props: {
+ title?: unknown;
+ icon?: unknown;
+ children?: unknown;
+ 'aria-label'?: string;
+ 'aria-labelledby'?: string;
+}) => {
+ if (
+ !props.children &&
+ props.icon &&
+ !props.title &&
+ !(props['aria-label'] || props['aria-labelledby'])
+ ) {
+ throw new Error(
+ '@fluentui-contrib/teams-components::Icon button must have a title or aria label'
+ );
+ }
+};
+
+export const validateHasContent = (props: {
+ children?: unknown;
+ icon?: unknown;
+}) => {
+ if (!props.children && !props.icon) {
+ throw new Error(
+ '@fluentui-contrib/teams-components::SplitButton must have at least one of children or icon'
+ );
+ }
+};
diff --git a/packages/teams-components/src/index.ts b/packages/teams-components/src/index.ts
index 0d8982ff..e31d5815 100644
--- a/packages/teams-components/src/index.ts
+++ b/packages/teams-components/src/index.ts
@@ -3,6 +3,7 @@ export {
ToggleButton,
type ToggleButtonProps,
} from './components/ToggleButton';
+export { SplitButton } from './components/SplitButton';
export {
makeStrictStyles,
mergeStrictClasses,
diff --git a/packages/teams-components/stories/SplitButton/Default.stories.tsx b/packages/teams-components/stories/SplitButton/Default.stories.tsx
new file mode 100644
index 00000000..63a1f571
--- /dev/null
+++ b/packages/teams-components/stories/SplitButton/Default.stories.tsx
@@ -0,0 +1,240 @@
+import * as React from 'react';
+import { SplitButton } from '@fluentui-contrib/teams-components';
+import {
+ makeStyles,
+ tokens,
+ Menu,
+ MenuPopover,
+ MenuList,
+ MenuItem,
+} from '@fluentui/react-components';
+import {
+ CalendarRegular,
+ CalendarFilled,
+ bundleIcon,
+} from '@fluentui/react-icons';
+
+const CalendarIcon = bundleIcon(CalendarFilled, CalendarRegular);
+
+const useStyles = makeStyles({
+ sampleContainer: {
+ display: 'grid',
+ gridTemplateColumns: 'repeat(5, 120px)',
+ gap: tokens.spacingHorizontalL,
+ },
+
+ evil: {
+ background: 'red',
+ },
+});
+
+export const Default = () => {
+ const styles = useStyles();
+ return (
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ );
+};
diff --git a/packages/teams-components/stories/SplitButton/index.stories.tsx b/packages/teams-components/stories/SplitButton/index.stories.tsx
new file mode 100644
index 00000000..bbd89c3b
--- /dev/null
+++ b/packages/teams-components/stories/SplitButton/index.stories.tsx
@@ -0,0 +1,10 @@
+import type { Meta } from '@storybook/react';
+import { SplitButton } from '@fluentui-contrib/teams-components';
+export { Default } from './Default.stories';
+
+const meta = {
+ title: 'Packages/teams-components/SplitButton',
+ component: SplitButton,
+} satisfies Meta;
+
+export default meta;
diff --git a/yarn.lock b/yarn.lock
index 3d251f05..26c73a44 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2413,10 +2413,10 @@
"@griffel/react" "^1.5.22"
"@swc/helpers" "^0.5.1"
-"@fluentui/react-shared-contexts@^9.23.1", "@fluentui/react-shared-contexts@^9.7.2":
- version "9.23.1"
- resolved "https://registry.yarnpkg.com/@fluentui/react-shared-contexts/-/react-shared-contexts-9.23.1.tgz#96155b604574c2207d1100727d477f5ab6e6e36d"
- integrity sha512-mP+7talxLz7n0G36o7Asdvst+JPzUbqbnoMKUWRVB5YwzlOXumEgaQDgL1BkRUJYaDGOjIiSTUjHOEkBt7iSdg==
+"@fluentui/react-shared-contexts@>=9.7.2 <10.0.0", "@fluentui/react-shared-contexts@^9.23.1", "@fluentui/react-shared-contexts@^9.7.2":
+ version "9.24.0"
+ resolved "https://registry.yarnpkg.com/@fluentui/react-shared-contexts/-/react-shared-contexts-9.24.0.tgz#33cf16ee3f2736e9f3a194680ee23533039e90a4"
+ integrity sha512-GA+uLv711E+YGrAP/aVB15ozvNCiuB2ZrPDC9aYF+A6sRDxoZZG8VgHjhQ/YWJfVjDXLky4ihirknzsW1sjGtg==
dependencies:
"@fluentui/react-theme" "^9.1.24"
"@swc/helpers" "^0.5.1"