[ARVADOS-WORKBENCH2] updated: 1.2.0-800-g30e3140
Git user
git at public.curoverse.com
Tue Nov 6 05:39:21 EST 2018
Summary of changes:
src/components/icon/icon.tsx | 2 +-
src/components/list-item-text-icon/list-item-text-icon.tsx | 14 +++++---------
src/views-components/side-panel-tree/side-panel-tree.tsx | 2 +-
3 files changed, 7 insertions(+), 11 deletions(-)
via 30e3140a2a78465e14017219fbf9baece57554bb (commit)
from 6577969579f623c9788113083342a5268ee7c8c8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 30e3140a2a78465e14017219fbf9baece57554bb
Author: Pawel Kromplewski <pawel.kromplewski at contractors.roche.com>
Date: Tue Nov 6 11:39:14 2018 +0100
Use numeric value for font size instead of static class
Feature #14425
Arvados-DCO-1.1-Signed-off-by: Pawel Kromplewski <pawel.kromplewski at contractors.roche.com>
diff --git a/src/components/icon/icon.tsx b/src/components/icon/icon.tsx
index 1061a2e..a0fbd6e 100644
--- a/src/components/icon/icon.tsx
+++ b/src/components/icon/icon.tsx
@@ -50,7 +50,7 @@ import Star from '@material-ui/icons/Star';
import StarBorder from '@material-ui/icons/StarBorder';
import Warning from '@material-ui/icons/Warning';
-export type IconType = React.SFC<{ className?: string }>;
+export type IconType = React.SFC<{ className?: string, style?: object }>;
export const AddIcon: IconType = (props) => <Add {...props} />;
export const AddFavoriteIcon: IconType = (props) => <StarBorder {...props} />;
diff --git a/src/components/list-item-text-icon/list-item-text-icon.tsx b/src/components/list-item-text-icon/list-item-text-icon.tsx
index e18e9cc..29768c0 100644
--- a/src/components/list-item-text-icon/list-item-text-icon.tsx
+++ b/src/components/list-item-text-icon/list-item-text-icon.tsx
@@ -9,7 +9,7 @@ import { ListItemIcon, ListItemText, Typography } from '@material-ui/core';
import { IconType } from '../icon/icon';
import * as classnames from "classnames";
-type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active' | 'fixFontSize';
+type CssRules = 'root' | 'listItemText' | 'hasMargin' | 'active';
const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
root: {
@@ -24,9 +24,6 @@ const styles: StyleRulesCallback<CssRules> = (theme: ArvadosTheme) => ({
},
hasMargin: {
marginLeft: `${theme.spacing.unit}px`,
- },
- fixFontSize: {
- fontSize: '1.25rem'
}
});
@@ -35,7 +32,7 @@ export interface ListItemTextIconDataProps {
name: string;
isActive?: boolean;
hasMargin?: boolean;
- fixFontSize?: boolean;
+ iconSize?: number;
}
type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles<CssRules>;
@@ -43,16 +40,15 @@ type ListItemTextIconProps = ListItemTextIconDataProps & WithStyles<CssRules>;
export const ListItemTextIcon = withStyles(styles)(
class extends React.Component<ListItemTextIconProps, {}> {
render() {
- const { classes, isActive, hasMargin, name, icon: Icon, fixFontSize } = this.props;
+ const { classes, isActive, hasMargin, name, icon: Icon, iconSize } = this.props;
return (
<Typography component='span' className={classes.root}>
<ListItemIcon className={classnames({
[classes.hasMargin]: hasMargin,
[classes.active]: isActive
})}>
- <Icon className={classnames({
- [classes.fixFontSize]: fixFontSize
- })}/>
+
+ <Icon style={{ fontSize: `${iconSize}rem` }} />
</ListItemIcon>
<ListItemText primary={
<Typography variant='body1' className={classnames(classes.listItemText, {
diff --git a/src/views-components/side-panel-tree/side-panel-tree.tsx b/src/views-components/side-panel-tree/side-panel-tree.tsx
index fc80332..33ee97f 100644
--- a/src/views-components/side-panel-tree/side-panel-tree.tsx
+++ b/src/views-components/side-panel-tree/side-panel-tree.tsx
@@ -45,7 +45,7 @@ const renderSidePanelItem = (item: TreeItem<ProjectResource>) =>
name={typeof item.data === 'string' ? item.data : item.data.name}
isActive={item.active}
hasMargin={true}
- fixFontSize={true}
+ iconSize={1.25}
/>;
const getProjectPickerIcon = (item: TreeItem<ProjectResource | string>) =>
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list