Private
Public Access
1
0

feat: Fluent UI Outlook Lite + connections mockup

This commit is contained in:
2026-04-14 18:52:25 +00:00
parent 1199eff6c3
commit dfa4010406
34820 changed files with 1003813 additions and 205 deletions

View File

@@ -0,0 +1,33 @@
'use client';
import * as React from 'react';
import { ChevronDownRegular } from '@fluentui/react-icons';
import { slot } from '@fluentui/react-utilities';
import { useButton_unstable } from '../Button/index';
/**
* Given user props, returns the final state for a MenuButton.
*/ export const useMenuButton_unstable = (props, ref)=>{
const { menuIcon, ...buttonProps } = props;
const buttonState = useButton_unstable(buttonProps, ref);
return {
...buttonState,
iconOnly: Boolean(!props.children),
// Slots definition
components: {
// eslint-disable-next-line @typescript-eslint/no-deprecated
...buttonState.components,
menuIcon: 'span'
},
root: {
...buttonState.root,
// force aria-expanded to be a boolean, not a string
'aria-expanded': props['aria-expanded'] ? props['aria-expanded'] === 'true' || props['aria-expanded'] === true : false
},
menuIcon: slot.optional(menuIcon, {
defaultProps: {
children: /*#__PURE__*/ React.createElement(ChevronDownRegular, null)
},
renderByDefault: true,
elementType: 'span'
})
};
};