UNPKG

office-ui-fabric-react

Version:

Reusable React components for building experiences for Office 365.

37 lines 3.77 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var tslib_1 = require("tslib"); var React = require("react"); var example_app_base_1 = require("@uifabric/example-app-base"); var ScrollablePane_Default_Example_1 = require("./examples/ScrollablePane.Default.Example"); var ScrollablePane_DetailsList_Example_1 = require("./examples/ScrollablePane.DetailsList.Example"); var ComponentStatus_1 = require("../../demo/ComponentStatus/ComponentStatus"); var ScrollablePane_checklist_1 = require("./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(example_app_base_1.ComponentPage, { title: 'ScrollablePane', componentName: 'ScrollablePaneExample', exampleCards: React.createElement("div", null, React.createElement(example_app_base_1.ExampleCard, { title: 'Default', code: ScrollablePaneDefaultExampleCode }, React.createElement(ScrollablePane_Default_Example_1.ScrollablePaneDefaultExample, null)), React.createElement(example_app_base_1.ExampleCard, { title: 'DetailsList Locked Header', code: ScrollablePaneDetailsListExampleCode }, React.createElement(ScrollablePane_DetailsList_Example_1.ScrollablePaneDetailsListExample, null))), propertiesTables: React.createElement(example_app_base_1.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_1.ComponentStatus, tslib_1.__assign({}, ScrollablePane_checklist_1.ScrollablePaneStatus)) })); }; return ScrollablePanePage; }(React.Component)); exports.ScrollablePanePage = ScrollablePanePage; //# sourceMappingURL=ScrollablePanePage.js.map