),
{
@@ -52,8 +52,8 @@ storiesOf('InfoButton', module)
alignItems: 'start',
}}
>
-
-
-
+
+
+
));
diff --git a/change/@fluentui-react-infobutton-e5984e77-89ae-4c61-85e0-984121adb4e5.json b/change/@fluentui-react-infobutton-e5984e77-89ae-4c61-85e0-984121adb4e5.json
new file mode 100644
index 0000000000000..dc638e760d65d
--- /dev/null
+++ b/change/@fluentui-react-infobutton-e5984e77-89ae-4c61-85e0-984121adb4e5.json
@@ -0,0 +1,7 @@
+{
+ "type": "prerelease",
+ "comment": "chore: Rename content slot to info.",
+ "packageName": "@fluentui/react-infobutton",
+ "email": "esteban.230@hotmail.com",
+ "dependentChangeType": "patch"
+}
diff --git a/packages/react-components/react-infobutton/docs/Spec.md b/packages/react-components/react-infobutton/docs/Spec.md
index deb161b3220fe..5789158ad5bc3 100644
--- a/packages/react-components/react-infobutton/docs/Spec.md
+++ b/packages/react-components/react-infobutton/docs/Spec.md
@@ -30,7 +30,7 @@ Because the Popover isn't always visible, it should not contain information that
## Sample Code
```jsx
-
+
```
## API
@@ -45,7 +45,7 @@ _**Public**_
```jsx
Popover above-start lorem ipsum dolor sit amet consectetur.
Learn more
@@ -62,7 +62,7 @@ return (
-
+
);
```
@@ -75,7 +75,7 @@ _**DOM**_
-
+
Popover above-start lorem ipsum dolor sit amet consectetur.
Learn more
diff --git a/packages/react-components/react-infobutton/etc/react-infobutton.api.md b/packages/react-components/react-infobutton/etc/react-infobutton.api.md
index 1d20b44a13245..46b9efca38289 100644
--- a/packages/react-components/react-infobutton/etc/react-infobutton.api.md
+++ b/packages/react-components/react-infobutton/etc/react-infobutton.api.md
@@ -31,7 +31,7 @@ export type InfoButtonProps = Omit>, 'di
export type InfoButtonSlots = {
root: NonNullable>;
popover: NonNullable>>;
- content: NonNullable>;
+ info: NonNullable>;
};
// @public
@@ -45,7 +45,7 @@ export const infoLabelClassNames: SlotClassNames;
// @public
export type InfoLabelProps = ComponentProps, 'label'> & {
- info?: InfoButtonProps['content'];
+ info?: InfoButtonProps['info'];
};
// @public (undocumented)
diff --git a/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx b/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx
index b7064887597d4..0a1918c8997ac 100644
--- a/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx
+++ b/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.test.tsx
@@ -27,17 +27,17 @@ describe('InfoButton', () => {
Component: InfoButton,
displayName: 'InfoButton',
requiredProps: {
- content: "This is an InfoButton's Content.",
+ info: "This is an InfoButton's information.",
},
testOptions: {
'has-static-classnames': [
{
props: {
- content: "This is an InfoButton's Content.",
+ info: "This is an InfoButton's information.",
},
expectedClassNames: {
root: infoButtonClassNames.root,
- content: infoButtonClassNames.content,
+ info: infoButtonClassNames.info,
},
getPortalElement: getPopoverSurfaceElement,
},
diff --git a/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts b/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts
index 12e34ee998732..ed230ae8c37db 100644
--- a/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts
+++ b/packages/react-components/react-infobutton/src/components/InfoButton/InfoButton.types.ts
@@ -5,14 +5,14 @@ export type InfoButtonSlots = {
root: NonNullable>;
/**
- * The Popover element that wraps the content and root. Use this slot to pass props to the Popover.
+ * The Popover element that wraps the info and root slots. Use this slot to pass props to the Popover.
*/
popover: NonNullable>>;
/**
- * The content to be displayed in the PopoverSurface when the button is pressed.
+ * The information to be displayed in the PopoverSurface when the button is pressed.
*/
- content: NonNullable>;
+ info: NonNullable>;
};
/**
diff --git a/packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx b/packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx
index 2b2884a7965eb..2e3c89e8ee9f3 100644
--- a/packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx
+++ b/packages/react-components/react-infobutton/src/components/InfoButton/renderInfoButton.tsx
@@ -15,7 +15,7 @@ export const renderInfoButton_unstable = (state: InfoButtonState) => {
-
+
);
};
diff --git a/packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx b/packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx
index b695ca5fea447..4acba3a4f1aa4 100644
--- a/packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx
+++ b/packages/react-components/react-infobutton/src/components/InfoButton/useInfoButton.tsx
@@ -36,7 +36,7 @@ export const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref>,
- content: PopoverSurface,
+ info: PopoverSurface,
},
root: getNativeElementProps('button', {
@@ -54,7 +54,7 @@ export const useInfoButton_unstable = (props: InfoButtonProps, ref: React.Ref = {
root: 'fui-InfoButton',
// this className won't be used, but it's needed to satisfy the type checker
popover: 'fui-InfoButton__popover',
- content: 'fui-InfoButton__content',
+ info: 'fui-InfoButton__info',
};
/**
@@ -107,10 +107,10 @@ export const useInfoButtonStyles_unstable = (state: InfoButtonState): InfoButton
const buttonStyles = useButtonStyles();
const popoverSurfaceStyles = usePopoverSurfaceStyles();
- state.content.className = mergeClasses(
- infoButtonClassNames.content,
+ state.info.className = mergeClasses(
+ infoButtonClassNames.info,
size === 'large' && popoverSurfaceStyles.large,
- state.content.className,
+ state.info.className,
);
state.root.className = mergeClasses(
diff --git a/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.test.tsx b/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.test.tsx
index 5e8f9ddb9a6a1..95c7ec9676b0e 100644
--- a/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.test.tsx
+++ b/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.test.tsx
@@ -25,8 +25,8 @@ describe('InfoLabel', () => {
expect(result.getByRole('button')).toBeTruthy();
});
- it("renders an InfoButton when the infoButton slot's content is set", () => {
- const result = render(Test label);
+ it("renders an InfoButton when the infoButton's info slot is set", () => {
+ const result = render(Test label);
expect(result.getByRole('button')).toBeTruthy();
});
diff --git a/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.types.ts b/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.types.ts
index bc268c3c5d0ad..f35a9f99533df 100644
--- a/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.types.ts
+++ b/packages/react-components/react-infobutton/src/components/InfoLabel/InfoLabel.types.ts
@@ -32,7 +32,7 @@ export type InfoLabelProps = ComponentProps, 'label'> &
/**
* The content of the InfoButton's popover.
*/
- info?: InfoButtonProps['content'];
+ info?: InfoButtonProps['info'];
};
/**
diff --git a/packages/react-components/react-infobutton/src/components/InfoLabel/useInfoLabel.ts b/packages/react-components/react-infobutton/src/components/InfoLabel/useInfoLabel.ts
index 02a30345d8460..1c771d22c3e80 100644
--- a/packages/react-components/react-infobutton/src/components/InfoLabel/useInfoLabel.ts
+++ b/packages/react-components/react-infobutton/src/components/InfoLabel/useInfoLabel.ts
@@ -48,7 +48,7 @@ export const useInfoLabel_unstable = (props: InfoLabelProps, ref: React.Ref
diff --git a/packages/react-components/react-infobutton/stories/InfoLabel/InfoLabelDefault.stories.tsx b/packages/react-components/react-infobutton/stories/InfoLabel/InfoLabelDefault.stories.tsx
index 6d0892297b69d..76a4ab5c344a9 100644
--- a/packages/react-components/react-infobutton/stories/InfoLabel/InfoLabelDefault.stories.tsx
+++ b/packages/react-components/react-infobutton/stories/InfoLabel/InfoLabelDefault.stories.tsx
@@ -7,7 +7,7 @@ export const Default = (props: Partial) => (
- This is example content for an InfoButton. Learn more
+ This is example information for an InfoButton. Learn more
>
}
{...props}
diff --git a/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDefault.stories.tsx b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDefault.stories.tsx
index 63dd8419d4542..337698c2baf85 100644
--- a/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDefault.stories.tsx
+++ b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonDefault.stories.tsx
@@ -5,9 +5,9 @@ import { Link } from '@fluentui/react-components';
export const Default = (props: Partial) => (
- This is example content for an InfoButton. Learn more
+ This is example information for an InfoButton. Learn more
>
}
/>
diff --git a/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonSize.stories.tsx b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonSize.stories.tsx
index 030ce8b15c7bc..ef4aaff014996 100644
--- a/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonSize.stories.tsx
+++ b/packages/react-components/react-infobutton/stories/Infobutton/InfoButtonSize.stories.tsx
@@ -19,27 +19,30 @@ export const Size = () => {
- This is example content for a small InfoButton. Learn more.
+ This is example information for a small InfoButton.{' '}
+ Learn more.
>
}
/>
- This is example content for a medium InfoButton. Learn more.
+ This is example information for a medium InfoButton.{' '}
+ Learn more.
>
}
/>
- This is example content for a large InfoButton. Learn more.
+ This is example information for a large InfoButton.{' '}
+ Learn more.
>
}
/>