Skip to content
Merged
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
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Added support for native props on Panel for the root div with class ms-Panel",
"type": "minor"
}
],
"packageName": "office-ui-fabric-react",
"email": "v-brgarl@microsoft.com"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import * as React from 'react';
import {
BaseComponent,
css,
divProperties,
getId,
getNativeProps,
getRTL,
createRef
} from '../../Utilities';
Expand Down Expand Up @@ -102,6 +104,7 @@ export class Panel extends BaseComponent<IPanelProps, IPanelState> implements IP
const isOnRightSide = isRTL ? isLeft : !isLeft;
const headerTextId = headerText && id + '-headerText';
const customWidthStyles = (type === PanelType.custom) ? { width: customWidth } : {};
const nativeProps = getNativeProps(this.props, divProperties);

if (!isOpen && !isAnimating && !isHiddenOnDismiss) {
return null;
Expand Down Expand Up @@ -137,6 +140,7 @@ export class Panel extends BaseComponent<IPanelProps, IPanelState> implements IP
}
>
<div
{ ...nativeProps }
className={
css(
'ms-Panel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export class PanelPage extends React.Component<IComponentDemoPageProps, {}> {
title='Panel'
componentName='PanelExample'
componentUrl='https://github.com/OfficeDev/office-ui-fabric-react/tree/master/packages/office-ui-fabric-react/src/components/Panel'
allowNativeProps={ true }
exampleCards={
<div>
<ExampleCard title='Panel - Small Panel, Anchored Right, Fixed Width' code={ PanelSmallRightExampleCode }>
Expand Down