@bitrise/bitkit 9.8.5 → 9.10.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,15 +1,25 @@
|
|
|
1
1
|
import { textSizes } from '../../Foundations/Typography/Typography';
|
|
2
2
|
|
|
3
|
+
const schemeColors = {
|
|
4
|
+
purple: { color: 'purple.50', hover: 'purple.30' },
|
|
5
|
+
white: { color: 'neutral.100', hover: 'neutral.95' },
|
|
6
|
+
gray: { color: 'neutral.70', hover: 'neutral.50' },
|
|
7
|
+
default: { color: 'inherit', hover: 'inherit' },
|
|
8
|
+
};
|
|
9
|
+
|
|
3
10
|
const LinkTheme = {
|
|
4
|
-
baseStyle: {
|
|
5
|
-
color
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
baseStyle: ({ colorScheme: c }: { colorScheme?: 'purple' | 'white' | 'gray' }) => {
|
|
12
|
+
const { color, hover } = schemeColors[c || 'default'];
|
|
13
|
+
return {
|
|
14
|
+
color,
|
|
15
|
+
fontSize: 'inherit',
|
|
16
|
+
_focus: {
|
|
17
|
+
outline: 'none',
|
|
18
|
+
},
|
|
19
|
+
_hover: {
|
|
20
|
+
color: hover,
|
|
21
|
+
},
|
|
22
|
+
};
|
|
13
23
|
},
|
|
14
24
|
...textSizes,
|
|
15
25
|
};
|
|
@@ -3,6 +3,7 @@ import { Link as ChakraLink, LinkProps as ChakraLinkProps } from '@chakra-ui/rea
|
|
|
3
3
|
import { TextSizes } from '../../Foundations/Typography/Typography';
|
|
4
4
|
|
|
5
5
|
export interface LinkProps extends ChakraLinkProps {
|
|
6
|
+
colorScheme?: 'purple' | 'white' | 'gray';
|
|
6
7
|
isUnderlined?: boolean;
|
|
7
8
|
size?: TextSizes;
|
|
8
9
|
target?: HTMLAttributeAnchorTarget;
|
|
@@ -22,7 +23,7 @@ const Link = (props: LinkProps) => {
|
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
Link.defaultProps = {
|
|
25
|
-
isUnderlined:
|
|
26
|
+
isUnderlined: false,
|
|
26
27
|
} as LinkProps;
|
|
27
28
|
|
|
28
29
|
export default Link;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classnames from 'classnames';
|
|
3
|
-
import {
|
|
3
|
+
import { Icon } from '@bitrise/bitkit';
|
|
4
|
+
import Link from '../Link/Link';
|
|
4
5
|
import Flex, { Props as FlexProps } from '../Flex/Flex';
|
|
5
6
|
import { ModalContext } from './ModalContext';
|
|
6
7
|
|
package/src/index.ts
CHANGED
|
@@ -134,8 +134,8 @@ export { default as InputInlineHelp } from './Old/Input/InputInlineHelp';
|
|
|
134
134
|
export type { Props as InputLabelProps } from './Old/Input/InputLabel';
|
|
135
135
|
export { default as InputLabel } from './Old/Input/InputLabel';
|
|
136
136
|
|
|
137
|
-
export type {
|
|
138
|
-
export { default as Link } from './
|
|
137
|
+
export type { LinkProps } from './Components/Link/Link';
|
|
138
|
+
export { default as Link } from './Components/Link/Link';
|
|
139
139
|
|
|
140
140
|
export type { Props as ListProps } from './Old/List/List';
|
|
141
141
|
export { default as List } from './Old/List/List';
|