UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

35 lines 3.5 kB
import * as tslib_1 from "tslib"; import * as React from 'react'; import { ExampleCard, ComponentPage, PropertiesTableSet } from '@uifabric/example-app-base'; import { ScrollablePaneDefaultExample } from './examples/ScrollablePane.Default.Example'; import { ScrollablePaneDetailsListExample } from './examples/ScrollablePane.DetailsList.Example'; import { ComponentStatus } from '../../demo/ComponentStatus/ComponentStatus'; import { ScrollablePaneStatus } from './ScrollablePane.checklist'; var ScrollablePaneDefaultExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ScrollablePane/examples/ScrollablePane.Default.Example.tsx'); var ScrollablePaneDetailsListExampleCode = require('!raw-loader!office-ui-fabric-react/src/components/ScrollablePane/examples/ScrollablePane.DetailsList.Example.tsx'); var ScrollablePanePage = /** @class */ (function (_super) { tslib_1.__extends(ScrollablePanePage, _super); function ScrollablePanePage() { return _super !== null && _super.apply(this, arguments) || this; } ScrollablePanePage.prototype.render = function () { return (React.createElement(ComponentPage, { title: 'ScrollablePane', componentName: 'ScrollablePaneExample', exampleCards: React.createElement("div", null, React.createElement(ExampleCard, { title: 'Default', code: ScrollablePaneDefaultExampleCode }, React.createElement(ScrollablePaneDefaultExample, null)), React.createElement(ExampleCard, { title: 'DetailsList Locked Header', code: ScrollablePaneDetailsListExampleCode }, React.createElement(ScrollablePaneDetailsListExample, null))), propertiesTables: React.createElement(PropertiesTableSet, { sources: [ require('!raw-loader!office-ui-fabric-react/src/components/ScrollablePane/ScrollablePane.types.ts'), require('!raw-loader!office-ui-fabric-react/src/components/Sticky/Sticky.types.ts') ] }), overview: React.createElement("div", null, React.createElement("p", null, "ScrollablePane is a helper component designed to use in conjunction with a Sticky component. Sticky components will \"stick\" to the top or bottom of a ScrollablePane's scrollable region and remain visible. ScrollablePane requires a height or max-height set either on the component itself, or on the immediate parent element.")), bestPractices: React.createElement("div", null), dos: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Ensure that a parent component has a CSS height, or max-height attribute set (and any intermediary containers have an inherit, or explicit height/max-height set)."), React.createElement("li", null, "Use Sticky component on block level elements"), React.createElement("li", null, "Sticky component are ideally section headers and/or footers"))), donts: React.createElement("div", null, React.createElement("ul", null, React.createElement("li", null, "Don't use Sticky on elements with margin top or bottom"))), isHeaderVisible: this.props.isHeaderVisible, componentStatus: React.createElement(ComponentStatus, tslib_1.__assign({}, ScrollablePaneStatus)) })); }; return ScrollablePanePage; }(React.Component)); export { ScrollablePanePage }; //# sourceMappingURL=ScrollablePanePage.js.map