@wix/design-system
Version:
@wix/design-system
81 lines • 2.68 kB
JavaScript
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
import _createClass from "@babel/runtime/helpers/createClass";
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
import _inherits from "@babel/runtime/helpers/inherits";
var _jsxFileName = "/home/builduser/work/57e038ea7326c1ec/packages/wix-design-system/dist/esm/TimeTable/docs/examples/header.jsx";
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
import React from 'react';
import TimeTable from '../..';
var TimeTableExample = /*#__PURE__*/function (_React$Component) {
function TimeTableExample() {
var _this;
_classCallCheck(this, TimeTableExample);
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_this = _callSuper(this, TimeTableExample, [].concat(args));
_this.state = {
columns: [{
title: '1',
subtitle: 'DAY',
items: [{
content: 'Item 1'
}],
disabled: true
}, {
title: '2',
subtitle: 'DAY',
items: [{
content: 'Item 2'
}],
active: true
}, {
title: '3',
subtitle: 'DAY',
items: []
}, {
title: '4',
subtitle: 'DAY',
items: []
}, {
title: '5',
subtitle: 'DAY',
items: []
}, {
title: '6',
subtitle: 'DAY',
items: []
}, {
title: '7',
subtitle: 'DAY',
items: []
}]
};
_this.handleOnChange = function (columns) {
_this.setState({
columns: columns
});
};
return _this;
}
_inherits(TimeTableExample, _React$Component);
return _createClass(TimeTableExample, [{
key: "render",
value: function render() {
return /*#__PURE__*/React.createElement(TimeTable, {
columns: this.state.columns,
onChange: this.handleOnChange,
height: "100%",
__self: this,
__source: {
fileName: _jsxFileName,
lineNumber: 53,
columnNumber: 7
}
});
}
}]);
}(React.Component);
export default TimeTableExample;