@teambit/base-ui.surfaces.split-pane.splitter
Advanced tools
Comparing version 0.2.4 to 0.2.5
@@ -1,2 +0,1 @@ | ||
export { default } from './splitter'; | ||
export { SplitterProps } from './splitter-props'; | ||
export * from './splitter'; |
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var splitter_1 = require("./splitter"); | ||
exports.default = splitter_1.default; | ||
__export(require("./splitter")); | ||
//# sourceMappingURL=index.js.map |
@@ -1,8 +0,6 @@ | ||
import { PureComponent } from 'react'; | ||
import { SplitterProps } from './splitter-props'; | ||
import './splitter.css'; | ||
export default class Splitter extends PureComponent<SplitterProps> { | ||
handleMouseDown: () => void; | ||
handleTouchStart: () => void; | ||
render(): JSX.Element; | ||
import React, { HTMLAttributes } from 'react'; | ||
export interface SplitterProps extends HTMLAttributes<HTMLDivElement> { | ||
isDragging?: boolean; | ||
onDragging?: (v: React.SetStateAction<boolean>) => void; | ||
} | ||
export declare function Splitter({ onDragging, isDragging, className, ...rest }: SplitterProps): JSX.Element; |
"use strict"; | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; | ||
result["default"] = mod; | ||
return result; | ||
var __rest = (this && this.__rest) || function (s, e) { | ||
var t = {}; | ||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) | ||
t[p] = s[p]; | ||
if (s != null && typeof Object.getOwnPropertySymbols === "function") | ||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { | ||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) | ||
t[p[i]] = s[p[i]]; | ||
} | ||
return t; | ||
}; | ||
@@ -13,21 +17,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const react_1 = __importStar(require("react")); | ||
const classnames_1 = __importDefault(require("classnames")); | ||
require("./splitter.css"); | ||
class Splitter extends react_1.PureComponent { | ||
constructor() { | ||
super(...arguments); | ||
this.handleMouseDown = () => { | ||
this.props.onDragStarted(); | ||
}; | ||
this.handleTouchStart = () => { | ||
this.props.onDragStarted(); | ||
}; | ||
} | ||
render() { | ||
const { className, children } = this.props; | ||
return (react_1.default.createElement("div", { className: classnames_1.default(className, 'splitter'), onMouseDown: this.handleMouseDown, onTouchStart: this.handleTouchStart }, children)); | ||
} | ||
const react_1 = __importDefault(require("react")); | ||
const splitter_module_scss_1 = __importDefault(require("./splitter.module.scss")); | ||
function Splitter(_a) { | ||
var { onDragging, isDragging, className } = _a, rest = __rest(_a, ["onDragging", "isDragging", "className"]); | ||
return (react_1.default.createElement("div", Object.assign({}, rest, { className: classnames_1.default(splitter_module_scss_1.default.splitter, className), onMouseDown: () => onDragging === null || onDragging === void 0 ? void 0 : onDragging(true), onTouchStart: () => onDragging === null || onDragging === void 0 ? void 0 : onDragging(true) }))); | ||
} | ||
exports.default = Splitter; | ||
exports.Splitter = Splitter; | ||
//# sourceMappingURL=splitter.js.map |
export * from './splitter'; | ||
{ | ||
"name": "@teambit/base-ui.surfaces.split-pane.splitter", | ||
"version": "0.2.4", | ||
"version": "0.2.5", | ||
"homepage": "https://bit.dev/teambit/base-ui/surfaces/split-pane/splitter", | ||
@@ -9,3 +9,3 @@ "main": "dist/index.js", | ||
"name": "surfaces/split-pane/splitter", | ||
"version": "0.2.4" | ||
"version": "0.2.5" | ||
}, | ||
@@ -19,4 +19,3 @@ "dependencies": { | ||
"@types/react-router-dom": "^5.1.5", | ||
"@types/mocha": "8.0.0", | ||
"react": "^15.0.0 || ^16.0.0" | ||
"@types/mocha": "8.0.0" | ||
}, | ||
@@ -23,0 +22,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3289731
4
3351