UNPKG

@pnp/spfx-property-controls

Version:

Reusable property pane controls for SharePoint Framework solutions

30 lines 1.02 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const tslib_1 = require("tslib"); const React = tslib_1.__importStar(require("react")); const react_1 = require("@fluentui/react"); /** * Seconds component, renders the seconds dropdown */ class SecondsComponent extends React.Component { render() { const seconds = []; for (let k = 0; k < 60; k++) { let digitSec; if (k < 10) { digitSec = '0' + k; } else { digitSec = k.toString(); } let selected = false; if (k === this.props.value) { selected = true; } seconds.push({ key: k, text: digitSec, isSelected: selected }); } return (React.createElement(react_1.Dropdown, { disabled: this.props.disabled, label: '', options: seconds, onChanged: this.props.onChange })); } } exports.default = SecondsComponent; //# sourceMappingURL=SecondsComponent.js.map