@ambuj.bhaskar/react-component-library 0.8.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -288,6 +288,38 @@ declare type SpinnerProps = {
288
288
 
289
289
  declare type SVGprops = React.ComponentProps<"svg">;
290
290
 
291
+ /**
292
+ * A simple switch component.
293
+ *
294
+ * @remarks
295
+ * This component is a simple on/off switch.
296
+ *
297
+ * @param {SwitchProps} props - The props for the switch component.
298
+ * @param {boolean} [props.value=false] - Whether the switch is checked or not.
299
+ * @param {boolean} [props.disabled=false] - Whether the switch is disabled or not.
300
+ * @param {ReactNode} [props.checkedChildren] - The content of the switch when checked.
301
+ * @param {ReactNode} [props.unCheckedChildren] - The content of the switch when unchecked.
302
+ * @param {boolean} [props.loading] - Whether the switch is in loading state.
303
+ * @param {string} [props.uncheckedBackgroundColor] - Background color when unchecked.
304
+ * @param {string} [props.checkedBackgroundColor] - Background color when checked.
305
+ * @param {string} [props.disabledBackgroundColor] - Background color when disabled.
306
+ *
307
+ * @returns {React.ReactElement} - The switch component.
308
+ */
309
+ export declare const Switch: React.FC<SwitchProps>;
310
+
311
+ declare type SwitchProps = {
312
+ value?: boolean;
313
+ disabled?: boolean;
314
+ checkedChildren?: ReactNode;
315
+ unCheckedChildren?: ReactNode;
316
+ onChange?: (checked: boolean) => void;
317
+ loading?: boolean;
318
+ uncheckedBackgroundColor?: Color;
319
+ checkedBackgroundColor?: Color;
320
+ disabledBackgroundColor?: Color;
321
+ };
322
+
291
323
  declare type TextSize = "xs" | "s" | "m" | "l" | "xl";
292
324
 
293
325
  declare type Theme = Partial<{