react-toggle-slider
Advanced tools
Comparing version
@@ -29,3 +29,3 @@ import React, { CSSProperties } from 'react'; | ||
declare function ToggleSlider({ barBackgroundColor, barBackgroundColorActive, barBorderRadius, barHeight, barWidth, handleBackgroundColor, handleBackgroundColorActive, handleBorderRadius, handleSize, padding, transitionDuration, barTransitionDuration, handleTransitionDuration, onToggle, handleRenderer, handleRendererActive, barRenderer, barRendererActive, flip, barStyles, barStylesActive, handleStyles, handleStylesActive, active: initialActive, }: ToggleSliderProps): JSX.Element; | ||
export declare function useToggleSlider(props?: ToggleSliderProps): (boolean | JSX.Element)[]; | ||
export default ToggleSlider; | ||
declare function useToggleSlider(props?: ToggleSliderProps): (boolean | JSX.Element)[]; | ||
export { ToggleSlider, useToggleSlider }; |
@@ -33,3 +33,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.useToggleSlider = void 0; | ||
exports.useToggleSlider = exports.ToggleSlider = void 0; | ||
var react_1 = __importStar(require("react")); | ||
@@ -71,2 +71,3 @@ function ToggleSliderHandle(props) { | ||
} | ||
exports.ToggleSlider = ToggleSlider; | ||
function useToggleSlider(props) { | ||
@@ -81,2 +82,1 @@ var _a; | ||
exports.useToggleSlider = useToggleSlider; | ||
exports.default = ToggleSlider; |
@@ -29,3 +29,3 @@ import React, { CSSProperties } from 'react'; | ||
declare function ToggleSlider({ barBackgroundColor, barBackgroundColorActive, barBorderRadius, barHeight, barWidth, handleBackgroundColor, handleBackgroundColorActive, handleBorderRadius, handleSize, padding, transitionDuration, barTransitionDuration, handleTransitionDuration, onToggle, handleRenderer, handleRendererActive, barRenderer, barRendererActive, flip, barStyles, barStylesActive, handleStyles, handleStylesActive, active: initialActive, }: ToggleSliderProps): JSX.Element; | ||
export declare function useToggleSlider(props?: ToggleSliderProps): (boolean | JSX.Element)[]; | ||
export default ToggleSlider; | ||
declare function useToggleSlider(props?: ToggleSliderProps): (boolean | JSX.Element)[]; | ||
export { ToggleSlider, useToggleSlider }; |
@@ -48,3 +48,3 @@ var __assign = (this && this.__assign) || function () { | ||
} | ||
export function useToggleSlider(props) { | ||
function useToggleSlider(props) { | ||
var _a; | ||
@@ -57,2 +57,2 @@ var _b = useState((_a = props === null || props === void 0 ? void 0 : props.active) !== null && _a !== void 0 ? _a : false), activeState = _b[0], setActiveState = _b[1]; | ||
} | ||
export default ToggleSlider; | ||
export { ToggleSlider, useToggleSlider }; |
{ | ||
"name": "react-toggle-slider", | ||
"version": "0.2.4", | ||
"version": "0.3.0", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "email": "markvadeika@gmail.com", |
@@ -5,2 +5,12 @@ # react-toggle-slider | ||
## Installation | ||
Install using NPM: | ||
`npm install react-toggle-slider` | ||
Or install using Yarn: | ||
`yarn add react-toggle-slider` | ||
## Usage | ||
@@ -11,3 +21,3 @@ | ||
```tsx | ||
import ToggleSlider from "react-toggle-slider"; | ||
import { ToggleSlider } from "react-toggle-slider"; | ||
@@ -66,3 +76,3 @@ function App() { | ||
import ToggleSlider from "react-toggle-slider"; | ||
import { ToggleSlider } from "react-toggle-slider"; | ||
@@ -69,0 +79,0 @@ function App() { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
28117
0.66%111
9.9%0
-100%