@bitrise/bitkit 12.52.6 → 12.54.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "12.52.6",
4
+ "version": "12.54.0",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -1,5 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
2
  import {
3
+ BoxProps,
3
4
  Drawer as ChakraDrawer,
4
5
  DrawerBody,
5
6
  DrawerFooter,
@@ -16,16 +17,17 @@ export interface DrawerProps
16
17
  extends Pick<ChakraDrawerProps, 'finalFocusRef' | 'initialFocusRef' | 'isOpen' | 'onClose' | 'onCloseComplete'> {
17
18
  children: DrawerContentProps['children'];
18
19
  footer?: ReactNode;
20
+ maxWidth?: BoxProps['maxWidth'];
19
21
  title: string;
20
22
  }
21
23
 
22
24
  const Drawer = (props: DrawerProps) => {
23
- const { children, footer, title, ...drawerProps } = props;
25
+ const { children, footer, maxWidth = '20rem', title, ...drawerProps } = props;
24
26
 
25
27
  return (
26
28
  <ChakraDrawer {...drawerProps}>
27
29
  <DrawerOverlay />
28
- <DrawerContent>
30
+ <DrawerContent maxWidth={maxWidth}>
29
31
  <DrawerCloseButton size="small">
30
32
  <Icon name="CloseSmall" />
31
33
  </DrawerCloseButton>
@@ -2,6 +2,7 @@ import { ComponentProps } from 'react';
2
2
  import ReactMarkdown, { Components } from 'react-markdown';
3
3
 
4
4
  import List from '../List/List';
5
+ import Link from '../Link/Link';
5
6
  import ListItem from '../List/ListItem';
6
7
  import Box from '../Box/Box';
7
8
  import Divider from '../Divider/Divider';
@@ -9,6 +10,7 @@ import Text from '../Text/Text';
9
10
  import CodeBlock from '../CodeBlock/CodeBlock';
10
11
 
11
12
  const defaultComponents: Components = {
13
+ a: ({ node, ...props }) => <Link colorScheme="purple" isUnderlined target="_blank" {...props} />,
12
14
  h1: ({ node, ...props }) => <Text as="h1" size="6" {...props} />,
13
15
  h2: ({ node, ...props }) => <Text as="h2" size="5" {...props} />,
14
16
  h3: ({ node, ...props }) => <Text as="h3" size="4" fontWeight="bold" {...props} />,