Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert some css module changes and fix missing units #715

Merged
merged 3 commits into from
Apr 8, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/components/ControlBar/DashboardItemChip.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export const DashboardItemChip = ({
}) => {
const chipProps = {
selected,
className: classes.chip,
};

if (starred) {
Expand Down
21 changes: 18 additions & 3 deletions src/components/ControlBar/Filter.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import i18n from '@dhis2/d2-i18n';
import { withStyles } from '@material-ui/core/styles';
import InputField from '@material-ui/core/Input';
import InputAdornment from '@material-ui/core/InputAdornment';
import SearchIcon from '@material-ui/icons/Search';
import { colors } from '@dhis2/ui-core';

import ClearButton from './ClearButton';
import { DEFAULT_STATE_DASHBOARDS_FILTER_NAME } from '../../reducers/dashboardsFilter';

import classes from './styles/Filter.module.css';
const styles = {
filterField: {
fontSize: '14px',
width: '200px',
height: '30px',
top: '-4px',
},
searchIcon: {
color: colors.grey700,
width: '20px',
height: '20px',
},
};

export const KEYCODE_ENTER = 13;
export const KEYCODE_ESCAPE = 27;
Expand Down Expand Up @@ -48,7 +62,7 @@ export class Filter extends Component {
};

render() {
const { name, onChangeName } = this.props;
const { classes, name, onChangeName } = this.props;

const startAdornment = (
<InputAdornment position="start">
Expand Down Expand Up @@ -78,6 +92,7 @@ export class Filter extends Component {
}

Filter.propTypes = {
classes: PropTypes.object,
name: PropTypes.string,
onChangeName: PropTypes.func,
onKeypressEnter: PropTypes.func,
Expand All @@ -88,4 +103,4 @@ Filter.defaultProps = {
onChangeName: Function.prototype,
};

export default Filter;
export default withStyles(styles)(Filter);
Loading