Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export const tooltipClassNames: SlotClassNames<TooltipSlots>;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Charts-DonutChart 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic - Dark Mode.default.chromium.png 7530 Changed
vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png 5570 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 962 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 185 Changed
vr-tests-react-components/ProgressBar converged 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png 91 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 142 Changed
vr-tests-react-components/Skeleton converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with rectangle - Dark Mode.default.chromium.png 2 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled.disabled input hover.chromium.png 677 Changed

There were 2 duplicate changes discarded. Check the build logs for more information.

// @public
export type TooltipProps = ComponentProps<TooltipSlots> & TriggerProps<TooltipTriggerProps> & Pick<PortalProps, 'mountNode'> & {
appearance?: 'normal' | 'inverted';
appearance?: 'normal' | 'inverted' | 'brand';
hideDelay?: number;
onVisibleChange?: (event: React_2.PointerEvent<HTMLElement> | React_2.FocusEvent<HTMLElement> | undefined, data: OnVisibleChangeData) => void;
positioning?: PositioningShorthand;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ export type TooltipProps = ComponentProps<TooltipSlots> &
* The tooltip's visual appearance.
* * `normal` - Uses the theme's background and text colors.
* * `inverted` - Higher contrast variant that uses the theme's inverted colors.
* * `brand` - Uses the brand colors from the theme.
*
* @default normal
*/
appearance?: 'normal' | 'inverted';
appearance?: 'normal' | 'inverted' | 'brand';
/**
* Delay before the tooltip is hidden, in milliseconds.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ const useStyles = makeStyles({
color: tokens.colorNeutralForegroundStaticInverted,
},

brand: {
backgroundColor: tokens.colorBrandBackground,
color: tokens.colorNeutralForegroundOnBrand,
},

arrow: createArrowStyles({ arrowHeight }),
});

Expand All @@ -60,6 +65,7 @@ export const useTooltipStyles_unstable = (state: TooltipState): TooltipState =>
tooltipClassNames.content,
styles.root,
state.appearance === 'inverted' && styles.inverted,
state.appearance === 'brand' && styles.brand,
state.visible && styles.visible,
state.content.className,
);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import * as React from 'react';
import type { JSXElement } from '@fluentui/react-components';
import { Button, Tooltip } from '@fluentui/react-components';
import { SlideTextFilled } from '@fluentui/react-icons';

export const Brand = (): JSXElement => (
<Tooltip appearance="brand" content="Example brand tooltip" relationship="label">
<Button icon={<SlideTextFilled />} size="large" />
</Tooltip>
);

Brand.storyName = 'Appearance: brand';
Brand.parameters = {
docs: {
description: {
story: "The `appearance` prop can be set to `brand` to use the theme's brand colors.",
},
},
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export { Default } from './TooltipDefault.stories';
export { RelationshipLabel } from './TooltipRelationshipLabel.stories';
export { RelationshipDescription } from './TooltipRelationshipDescription.stories';
export { Inverted } from './TooltipInverted.stories';
export { Brand } from './TooltipBrand.stories';
export { WithArrow } from './TooltipWithArrow.stories';
export { Styled } from './TooltipStyled.stories';
export { CustomMount } from './TooltipCustomMount.stories';
Expand Down
Loading