@bitrise/bitkit 13.105.0 → 13.106.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
|
@@ -5,7 +5,7 @@ import Text from '../Text/Text';
|
|
|
5
5
|
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
6
6
|
import Link from '../Link/Link';
|
|
7
7
|
|
|
8
|
-
type SidebarItemProps = {
|
|
8
|
+
type SidebarItemProps = ChakraProps & {
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
selected?: boolean;
|
|
11
11
|
disabled?: boolean;
|
|
@@ -13,15 +13,15 @@ type SidebarItemProps = {
|
|
|
13
13
|
href?: string;
|
|
14
14
|
isExternal?: boolean;
|
|
15
15
|
} & (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
);
|
|
16
|
+
| {
|
|
17
|
+
href: string;
|
|
18
|
+
isExternal?: boolean;
|
|
19
|
+
}
|
|
20
|
+
| {
|
|
21
|
+
onClick?: () => void;
|
|
22
|
+
isExternal?: never;
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
25
|
|
|
26
26
|
const [SidebarItemStyleProvider, useSidebarItemStyle] = createStylesContext('SidebarItem');
|
|
27
27
|
|
|
@@ -37,11 +37,12 @@ const sidebarVariant = ({ disabled, selected }: { selected?: boolean; disabled?:
|
|
|
37
37
|
|
|
38
38
|
const SidebarItem = forwardRef(
|
|
39
39
|
(
|
|
40
|
-
{ children, disabled, href, isExternal, onClick, selected }: SidebarItemProps,
|
|
40
|
+
{ children, disabled, href, isExternal, onClick, selected, ...rest }: SidebarItemProps,
|
|
41
41
|
ref: React.Ref<HTMLButtonElement & HTMLAnchorElement>,
|
|
42
42
|
) => {
|
|
43
43
|
const style = useMultiStyleConfig('SidebarItem', { variant: sidebarVariant({ disabled, selected }) });
|
|
44
44
|
const shared = {
|
|
45
|
+
...(rest as ChakraProps),
|
|
45
46
|
children: <SidebarItemStyleProvider value={style}>{children}</SidebarItemStyleProvider>,
|
|
46
47
|
height: '48',
|
|
47
48
|
href,
|