@bitrise/bitkit 9.12.1-alpha-chakra.4 → 9.12.1-alpha-chakra.5

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.12.1-alpha-chakra.4",
4
+ "version": "9.12.1-alpha-chakra.5",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -0,0 +1,9 @@
1
+ const CardTheme = {
2
+ baseStyle: {
3
+ _focusVisible: {
4
+ boxShadow: 'outline',
5
+ },
6
+ },
7
+ };
8
+
9
+ export default CardTheme;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { forwardRef, HTMLChakraProps } from '@chakra-ui/react';
2
+ import { forwardRef, HTMLChakraProps, useStyleConfig } from '@chakra-ui/react';
3
3
  import { Radii } from '../../Foundations/Radii/Radii';
4
4
  import { Shadows } from '../../Foundations/Shadows/Shadows';
5
5
  import Box, { BoxProps } from '../Box/Box';
@@ -15,6 +15,8 @@ export interface CardProps extends BoxProps {
15
15
  */
16
16
  const Card = forwardRef<CardProps, 'div'>((props, ref) => {
17
17
  const { withBorder, ...rest } = props;
18
+ const styles = useStyleConfig('Card');
19
+
18
20
  const properties = {
19
21
  backgroundColor: 'white',
20
22
  display: 'block',
@@ -28,7 +30,7 @@ const Card = forwardRef<CardProps, 'div'>((props, ref) => {
28
30
  if (props.as === 'button' && !(props as HTMLChakraProps<'button'>).type) {
29
31
  (properties as HTMLChakraProps<'button'>).type = 'button';
30
32
  }
31
- return <Box {...properties} ref={ref} />;
33
+ return <Box __css={styles} {...properties} ref={ref} />;
32
34
  });
33
35
 
34
36
  Card.defaultProps = {
package/src/theme.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import Button from './Components/Button/Button.theme';
2
+ import Card from './Components/Card/Card.theme';
2
3
  import Divider from './Components/Divider/Divider.theme';
3
4
  import Link from './Components/Link/Link.theme';
4
5
  import Menu from './Components/Menu/Menu.theme';
@@ -45,6 +46,7 @@ const theme = {
45
46
  },
46
47
  components: {
47
48
  Button,
49
+ Card,
48
50
  Divider,
49
51
  Link,
50
52
  Menu,