@bitrise/bitkit 10.1.0-alpha-breadcrumb.1 → 10.1.0-alpha-breadcrumb.2
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": "10.1.0-alpha-breadcrumb.
|
|
4
|
+
"version": "10.1.0-alpha-breadcrumb.2",
|
|
5
5
|
"repository": "git@github.com:bitrise-io/bitkit.git",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"license": "UNLICENSED",
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
forwardRef,
|
|
8
8
|
useBreakpointValue,
|
|
9
9
|
} from '@chakra-ui/react';
|
|
10
|
+
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
10
11
|
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
11
12
|
|
|
12
13
|
export interface BreadcrumbProps extends ChakraBreadcrumbProps {
|
|
@@ -20,7 +21,7 @@ export interface BreadcrumbProps extends ChakraBreadcrumbProps {
|
|
|
20
21
|
*/
|
|
21
22
|
const Breadcrumb = forwardRef<BreadcrumbProps, 'nav'>((props, ref) => {
|
|
22
23
|
const { children, hasSeparatorAfterLast, hasSeparatorBeforeFirst, separatorIconName, ...rest } = props;
|
|
23
|
-
const isMobile = !!useBreakpointValue({
|
|
24
|
+
const isMobile = !!useBreakpointValue({ [BREAKPOINTS.MOBILE]: true, [BREAKPOINTS.DESKTOP]: false }, 'desktop');
|
|
24
25
|
|
|
25
26
|
const childrenCount = Children.count(children);
|
|
26
27
|
const items = Children.map(children, (child, index) => {
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
forwardRef,
|
|
5
5
|
useBreakpointValue,
|
|
6
6
|
} from '@chakra-ui/react';
|
|
7
|
+
import { BREAKPOINTS } from '../../Foundations/Breakpoints/Breakpoints';
|
|
7
8
|
import Avatar from '../Avatar/Avatar';
|
|
8
9
|
|
|
9
10
|
export interface BreadcrumbLinkProps extends ChakraBreadcrumbLinkProps {
|
|
@@ -13,7 +14,7 @@ export interface BreadcrumbLinkProps extends ChakraBreadcrumbLinkProps {
|
|
|
13
14
|
|
|
14
15
|
const BreadcrumbLink = forwardRef<BreadcrumbLinkProps, 'a'>((props, ref) => {
|
|
15
16
|
const { avatarName, avatarUrl, children, isCurrentPage, ...rest } = props;
|
|
16
|
-
const isMobile = !!useBreakpointValue({
|
|
17
|
+
const isMobile = !!useBreakpointValue({ [BREAKPOINTS.MOBILE]: true, [BREAKPOINTS.DESKTOP]: false }, 'desktop');
|
|
17
18
|
|
|
18
19
|
const properties: ChakraBreadcrumbLinkProps = {
|
|
19
20
|
color: isCurrentPage ? 'neutral.40' : 'inherit',
|