@atls-ui-parts/datepicker 0.0.17 → 0.0.19

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.
@@ -11,13 +11,16 @@ const react_datepicker_2 = require("react-datepicker");
11
11
  const locales_1 = require("./locales");
12
12
  const styles_1 = require("./styles");
13
13
  const Datepicker = (props) => {
14
+ const { withBaseStyle = true, ...restProps } = props;
14
15
  (0, react_2.useEffect)(() => {
15
16
  (0, locales_1.registerLocales)();
16
17
  (0, react_datepicker_2.setDefaultLocale)('ru');
17
18
  }, []);
18
19
  (0, react_2.useEffect)(() => {
19
- (0, styles_1.createAndInjectDatepickerStyles)(props);
20
- }, [props]);
21
- return react_1.default.createElement(react_datepicker_1.default, { ...props });
20
+ if (withBaseStyle) {
21
+ (0, styles_1.createAndInjectDatepickerStyles)(props);
22
+ }
23
+ }, [withBaseStyle, props]);
24
+ return react_1.default.createElement(react_datepicker_1.default, { ...restProps });
22
25
  };
23
26
  exports.Datepicker = Datepicker;
@@ -1,4 +1,4 @@
1
1
  import { ReactDatePickerProps } from 'react-datepicker';
2
2
  import { DatepickerStyles } from './styles';
3
- export interface DatepickerProps extends DatepickerStyles, ReactDatePickerProps {
3
+ export interface DatepickerProps extends ReactDatePickerProps, DatepickerStyles {
4
4
  }
@@ -18,4 +18,5 @@ export interface AppearanceStyles {
18
18
  inputActiveBorderColor?: string;
19
19
  dayNameFontColor?: string;
20
20
  currentMonthFontColor?: string;
21
+ withBaseStyle?: boolean;
21
22
  }