@bitrise/bitkit 9.24.0 → 9.24.3

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "9.24.0",
4
+ "version": "9.24.3",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import {
2
3
  forwardRef,
3
4
  CloseButton as ChakraCloseButton,
@@ -21,8 +21,8 @@ const MenuTheme: SystemStyleObject = {
21
21
  },
22
22
  item: {
23
23
  color: 'purple.10',
24
- padding: '12',
25
- paddingRight: '16',
24
+ paddingY: '12',
25
+ paddingX: '16',
26
26
  _focus: {
27
27
  backgroundColor: 'neutral.93',
28
28
  boxShadow: 'none',
@@ -1,4 +1,4 @@
1
- import { createContext, useContext, useMemo } from 'react';
1
+ import React, { createContext, useContext, useMemo } from 'react';
2
2
  import {
3
3
  Alert as ChakraAlert,
4
4
  AlertTitle as NotificationTitle,
@@ -1,4 +1,5 @@
1
- import { useToast as useChakraToast, ToastOptions as ChakraToastOptions } from '@chakra-ui/react';
1
+ import React from 'react';
2
+ import { useToast as useChakraToast, UseToastOptions } from '@chakra-ui/react';
2
3
  import { DateTime } from 'luxon';
3
4
  import Notification, {
4
5
  ActionProps,
@@ -13,8 +14,8 @@ export interface ToastOptions {
13
14
  description: React.ReactNode;
14
15
  status: NotificationProps['status'];
15
16
  action?: ActionProps;
16
- duration?: ChakraToastOptions['duration'];
17
- position?: ChakraToastOptions['position'];
17
+ duration?: UseToastOptions['duration'];
18
+ position?: UseToastOptions['position'];
18
19
  isClosable?: boolean;
19
20
  showTimestamp?: boolean;
20
21
  }
@@ -29,7 +30,7 @@ const useToast = () => {
29
30
  toast({
30
31
  isClosable: opts.isClosable,
31
32
  duration: opts.duration,
32
- position: opts.position,
33
+ position: opts.position || 'bottom',
33
34
  render: ({ onClose }) => (
34
35
  <Notification
35
36
  boxShadow="large"