@plurid/plurid-ui-components-react 0.0.0-17 → 0.0.0-18

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.
@@ -1,11 +1,13 @@
1
1
  import React from 'react';
2
2
  import { Theme } from '@plurid/plurid-themes';
3
+ import { SwitchProperties } from '../Switch';
3
4
  export interface InputSwitchProperties {
4
5
  name: string;
5
6
  checked: boolean;
6
7
  atChange: () => void;
7
8
  theme?: Theme;
8
9
  compact?: boolean;
10
+ switch?: SwitchProperties;
9
11
  style?: React.CSSProperties;
10
12
  className?: string;
11
13
  }
@@ -1781,7 +1781,7 @@ const StyledInputSwitch = styled.div`
1781
1781
  `;
1782
1782
 
1783
1783
  const InputSwitch = properties => {
1784
- const {name: name, checked: checked, atChange: atChange, theme: themeProperty, compact: compact, style: style, className: className} = properties;
1784
+ const {name: name, checked: checked, atChange: atChange, theme: themeProperty, compact: compact, switch: switchProperties, style: style, className: className} = properties;
1785
1785
  const theme = themeProperty || plurid;
1786
1786
  return React.createElement(StyledInputSwitch, {
1787
1787
  compact: compact,
@@ -1791,13 +1791,13 @@ const InputSwitch = properties => {
1791
1791
  style: {
1792
1792
  marginLeft: "0.9rem"
1793
1793
  }
1794
- }, name), React.createElement(Switch, {
1794
+ }, name), React.createElement(Switch, Object.assign({
1795
1795
  checked: checked,
1796
1796
  level: 2,
1797
1797
  exclusive: true,
1798
1798
  theme: theme,
1799
1799
  atChange: () => atChange()
1800
- })));
1800
+ }, switchProperties))));
1801
1801
  };
1802
1802
 
1803
1803
  const StyledItemsline = styled.div`