superdesk-ui-framework 6.1.1 → 6.1.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/app-typescript/components/Icon.tsx +3 -2
- package/app-typescript/components/Navigation/SideBarTabs.tsx +3 -2
- package/dist/examples.bundle.js +1 -1
- package/dist/storybook/project.json +1 -1
- package/dist/superdesk-ui.bundle.js +1 -1
- package/package.json +1 -1
- package/react/components/Icon.d.ts +2 -3
- package/react/components/Navigation/SideBarTabs.d.ts +2 -0
- package/react/components/Navigation/SideBarTabs.js +1 -1
- package/storybook-static/project.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
export interface IIconProps {
|
|
4
5
|
name?: string;
|
|
5
6
|
size?: 'small' | 'big'; // defaults to 'small'
|
|
6
7
|
type?: 'default' | 'primary' | 'success' | 'warning' | 'alert' | 'highlight' | 'light' | 'white';
|
|
@@ -10,7 +11,7 @@ interface IProps {
|
|
|
10
11
|
color?: string;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
|
-
export class Icon extends React.PureComponent<
|
|
14
|
+
export class Icon extends React.PureComponent<IIconProps> {
|
|
14
15
|
render() {
|
|
15
16
|
let classes = classNames(this.props.className, {
|
|
16
17
|
[`icon-${this.props.name}`]:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {Icon} from '../Icon';
|
|
2
|
+
import {Icon, IIconProps} from '../Icon';
|
|
3
3
|
import {Badge} from '../Badge';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
5
|
|
|
@@ -15,6 +15,7 @@ interface IProps {
|
|
|
15
15
|
export interface ISideBarTab {
|
|
16
16
|
id: string;
|
|
17
17
|
icon: string;
|
|
18
|
+
type?: IIconProps['type'];
|
|
18
19
|
size: 'small' | 'big'; // defaults to 'small'
|
|
19
20
|
tooltip?: string;
|
|
20
21
|
badgeValue?: string;
|
|
@@ -68,7 +69,7 @@ export class SideBarTabs extends React.PureComponent<IProps> {
|
|
|
68
69
|
{item.badgeValue != null && <Badge text={item['badgeValue']} type="primary" />}
|
|
69
70
|
|
|
70
71
|
<span className="sd-sidetab-menu__main-icon ">
|
|
71
|
-
<Icon size={item
|
|
72
|
+
<Icon size={item.size} name={item.icon} type={item.type} />
|
|
72
73
|
</span>
|
|
73
74
|
|
|
74
75
|
<i className="sd-sidetab-menu__helper-icon icon-close-small"></i>
|