Skip to content

Commit

Permalink
Fabric component: styles prop respected (#14827)
Browse files Browse the repository at this point in the history
* fabric style fix.

* Change files

* fix
  • Loading branch information
dzearing authored Aug 31, 2020
1 parent feafb74 commit 3f948ab
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "prerelease",
"comment": "Fabric component: styles prop respected.",
"packageName": "@fluentui/react-next",
"email": "dzearing@hotmail.com",
"dependentChangeType": "patch",
"date": "2020-08-31T20:10:51.162Z"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "patch",
"comment": "Fabric component: styles prop respected.",
"packageName": "office-ui-fabric-react",
"email": "dzearing@hotmail.com",
"dependentChangeType": "patch",
"date": "2020-08-31T20:10:43.104Z"
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
getRTL,
FocusRects,
} from '../../Utilities';
import { getStyles } from './Fabric.styles';
import { IFabricProps, IFabricStyleProps, IFabricStyles } from './Fabric.types';
import { IProcessedStyleSet } from '@uifabric/merge-styles';
import { ITheme, createTheme } from '../../Styling';
Expand Down Expand Up @@ -69,8 +68,8 @@ export class FabricBase extends React.Component<IFabricProps> {
}

private _getClassNames(): IProcessedStyleSet<IFabricStyles> {
const { className, theme, applyTheme } = this.props;
const classNames = getClassNames(getStyles, {
const { className, theme, applyTheme, styles } = this.props;
const classNames = getClassNames(styles, {
theme: theme!,
applyTheme: applyTheme,
className,
Expand Down
5 changes: 2 additions & 3 deletions packages/react-next/src/components/Fabric/Fabric.base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
Customizer,
useFocusRects,
} from '../../Utilities';
import { getStyles } from './Fabric.styles';
import { IFabricProps, IFabricStyleProps, IFabricStyles } from './Fabric.types';
import { IProcessedStyleSet } from '@uifabric/merge-styles';
import { ITheme, createTheme } from '../../Styling';
Expand All @@ -34,9 +33,9 @@ const getDir = ({ theme, dir }: IFabricProps) => {
};

export const FabricBase = React.forwardRef((props: IFabricProps, ref: React.Ref<HTMLDivElement>) => {
const { className, theme, applyTheme, applyThemeToBody } = props;
const { className, theme, applyTheme, applyThemeToBody, styles } = props;

const classNames = getClassNames(getStyles, {
const classNames = getClassNames(styles, {
theme: theme!,
applyTheme: applyTheme,
className,
Expand Down

0 comments on commit 3f948ab

Please sign in to comment.