diff --git a/new-lamassu-admin/src/components/ConfirmDialog.js b/new-lamassu-admin/src/components/ConfirmDialog.js index 7cbb62a8..7b52d139 100644 --- a/new-lamassu-admin/src/components/ConfirmDialog.js +++ b/new-lamassu-admin/src/components/ConfirmDialog.js @@ -10,7 +10,6 @@ import React, { useEffect, useState, memo } from 'react' import { Button, IconButton } from 'src/components/buttons' import { ReactComponent as CloseIcon } from 'src/styling/icons/action/close/zodiac.svg' -import Tooltip from './Tooltip' import { TextInput } from './inputs' import { H4, P } from './typography' @@ -42,16 +41,13 @@ export const DialogTitle = ({ children, onClose }) => {
{children} {onClose && ( - - - - }> -

Close

-
+ onClick={onClose}> + + )}
) diff --git a/new-lamassu-admin/src/components/Modal.js b/new-lamassu-admin/src/components/Modal.js index 8d9d150c..98a5a362 100644 --- a/new-lamassu-admin/src/components/Modal.js +++ b/new-lamassu-admin/src/components/Modal.js @@ -3,11 +3,9 @@ import classnames from 'classnames' import React from 'react' import { IconButton } from 'src/components/buttons' -import { H1, H4, P } from 'src/components/typography' +import { H1, H4 } from 'src/components/typography' import { ReactComponent as CloseIcon } from 'src/styling/icons/action/close/zodiac.svg' -import Tooltip from './Tooltip' - const styles = { modal: { display: 'flex', @@ -76,16 +74,12 @@ const Modal = ({
{title && {title}} - handleClose()}> - - - }> -

Close

-
+ onClick={() => handleClose()}> + +
{children}
diff --git a/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js b/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js index a6515047..66045266 100644 --- a/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js +++ b/new-lamassu-admin/src/components/booleanPropertiesTable/BooleanPropertiesTable.js @@ -2,16 +2,14 @@ import { makeStyles } from '@material-ui/core/styles' import classnames from 'classnames' import React, { useState, memo } from 'react' -import { Link, IconButton } from 'src/components/buttons' +import { Link } from 'src/components/buttons' import { RadioGroup } from 'src/components/inputs' import { Table, TableBody, TableRow, TableCell } from 'src/components/table' import BooleanCell from 'src/components/tables/BooleanCell' -import { H4, P } from 'src/components/typography' +import { H4 } from 'src/components/typography' import { ReactComponent as EditIconDisabled } from 'src/styling/icons/action/edit/disabled.svg' import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/enabled.svg' -import Tooltip from '../Tooltip' - import { booleanPropertiesTableStyles } from './BooleanPropertiesTable.styles' const useStyles = makeStyles(booleanPropertiesTableStyles) @@ -71,25 +69,11 @@ const BooleanPropertiesTable = memo( ) : ( - <> - {disabled && ( - - - - )} - - {!disabled && ( - setEditing(true)}> - - - }> -

Configure the following properties as desired

-
- )} - +
+ +
)} diff --git a/new-lamassu-admin/src/components/editableTable/Row.js b/new-lamassu-admin/src/components/editableTable/Row.js index c1e38b01..f365de97 100644 --- a/new-lamassu-admin/src/components/editableTable/Row.js +++ b/new-lamassu-admin/src/components/editableTable/Row.js @@ -3,11 +3,10 @@ import { Field, useFormikContext } from 'formik' import * as R from 'ramda' import React, { useContext } from 'react' -import Tooltip from 'src/components/Tooltip' import { Link, IconButton } from 'src/components/buttons' import { Td, Tr } from 'src/components/fake-table/Table' import { Switch } from 'src/components/inputs' -import { TL2, P } from 'src/components/typography' +import { TL2 } from 'src/components/typography' import { ReactComponent as DisabledDeleteIcon } from 'src/styling/icons/action/delete/disabled.svg' import { ReactComponent as DeleteIcon } from 'src/styling/icons/action/delete/enabled.svg' import { ReactComponent as DisabledEditIcon } from 'src/styling/icons/action/edit/disabled.svg' @@ -55,46 +54,19 @@ const ActionCol = ({ disabled, editing }) => { )} {!editing && enableEdit && ( )} {!editing && enableDelete && ( )} {!editing && enableToggle && ( diff --git a/new-lamassu-admin/src/components/single-row-table/SingleRowTable.js b/new-lamassu-admin/src/components/single-row-table/SingleRowTable.js index e536932d..5df9bbfa 100644 --- a/new-lamassu-admin/src/components/single-row-table/SingleRowTable.js +++ b/new-lamassu-admin/src/components/single-row-table/SingleRowTable.js @@ -2,7 +2,6 @@ import { makeStyles } from '@material-ui/core' import classnames from 'classnames' import React from 'react' -import Tooltip from 'src/components/Tooltip' import { IconButton } from 'src/components/buttons' import { Table, @@ -14,8 +13,6 @@ import { } from 'src/components/fake-table/Table' import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/white.svg' -import { P } from '../typography' - import styles from './SingleRowTable.styles' const useStyles = makeStyles(styles) @@ -26,8 +23,7 @@ const SingleRowTable = ({ title, items, onEdit, - className, - editMessage + className }) => { const classes = useStyles({ width, height }) @@ -37,15 +33,9 @@ const SingleRowTable = ({ diff --git a/new-lamassu-admin/src/pages/Notifications/components/EditHeader.js b/new-lamassu-admin/src/pages/Notifications/components/EditHeader.js index 247c0e92..f293dfbf 100644 --- a/new-lamassu-admin/src/pages/Notifications/components/EditHeader.js +++ b/new-lamassu-admin/src/pages/Notifications/components/EditHeader.js @@ -1,9 +1,8 @@ import { makeStyles } from '@material-ui/core' import React from 'react' -import Tooltip from 'src/components/Tooltip' import { Link, IconButton } from 'src/components/buttons' -import { H4, P } from 'src/components/typography' +import { H4 } from 'src/components/typography' import { ReactComponent as DisabledEditIcon } from 'src/styling/icons/action/edit/disabled.svg' import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/enabled.svg' @@ -17,27 +16,14 @@ const Header = ({ title, editing, disabled, setEditing }) => { return (

{title}

- - {!editing && !disabled && ( - setEditing(true)}> - - - }> -

Modify value

-
- )} - - {!editing && disabled && ( - - + {!editing && ( + setEditing(true)} + className={classes.button} + disabled={disabled}> + {disabled ? : } )} - {editing && (
diff --git a/new-lamassu-admin/src/pages/OperatorInfo/ContactInfo.js b/new-lamassu-admin/src/pages/OperatorInfo/ContactInfo.js index a26ccd49..3c864efc 100644 --- a/new-lamassu-admin/src/pages/OperatorInfo/ContactInfo.js +++ b/new-lamassu-admin/src/pages/OperatorInfo/ContactInfo.js @@ -9,8 +9,7 @@ import React, { useState } from 'react' import * as Yup from 'yup' import ErrorMessage from 'src/components/ErrorMessage' -import Tooltip from 'src/components/Tooltip' -import { Link, IconButton } from 'src/components/buttons' +import { Link } from 'src/components/buttons' import Switch from 'src/components/inputs/base/Switch' import { TextInput, NumberInput } from 'src/components/inputs/formik' import { @@ -232,15 +231,11 @@ const ContactInfo = () => {
Info card {!editing && ( - setEditing(true)}> - - - }> -

Configure info card settings

-
+
+ +
)}
{
- }> - Sharing your information with your customers through your machines - allows them to contact you in case there's a problem with a machine in - your network or a transaction. - + Sharing your information with your customers through your machines allows them to contact you in case there's a problem with a machine in
- {!disableEdit && ( - onEdit && onEdit(values.id)}> - - - }> -

Modify row contents

-
- )} - - {disableEdit && ( - - - - )} + onEdit && onEdit(values.id)}> + {disableEdit ? : } +
- {!disabled && ( - onDelete(values.id)}> - - - }> -

Delete row

-
- )} - - {disabled && ( - - - - )} + onDelete(values.id)}> + {disabled ? : } +
{title} - - - - }> -

{editMessage}

-
+ + +