From e21bbcc6fe75fa1e289f86f1bd75e264fc147316 Mon Sep 17 00:00:00 2001 From: Levko Kravets Date: Fri, 8 Feb 2019 17:48:48 +0200 Subject: [PATCH] [UI/UX Improvement] Use Ant's Button component on users list page (#3416) --- client/app/assets/less/ant.less | 8 +++++++- client/app/assets/less/inc/ant-variables.less | 10 +++++++--- client/app/pages/users/UsersList.jsx | 17 +++++++---------- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/client/app/assets/less/ant.less b/client/app/assets/less/ant.less index d2fd4a9581..7b57053282 100644 --- a/client/app/assets/less/ant.less +++ b/client/app/assets/less/ant.less @@ -47,6 +47,12 @@ z-index: 1050; } +// Button overrides + +.@{btn-prefix-cls} { + transition-duration: 150ms; +} + // Fix ant input number showing duplicate arrows .ant-input-number-input::-webkit-outer-spin-button, .ant-input-number-input::-webkit-inner-spin-button { @@ -146,7 +152,7 @@ .@{table-prefix-cls} { color: inherit; - * { + tr, th, td { transition: none !important; } diff --git a/client/app/assets/less/inc/ant-variables.less b/client/app/assets/less/inc/ant-variables.less index 1376bc58ab..4e86e0b8b2 100644 --- a/client/app/assets/less/inc/ant-variables.less +++ b/client/app/assets/less/inc/ant-variables.less @@ -1,7 +1,6 @@ /* -------------------------------------------------------- Colors -----------------------------------------------------------*/ - @lightblue: #03A9F4; @primary-color: #2196F3; @@ -36,9 +35,15 @@ /* -------------------------------------------------------- - Pagination + Button -----------------------------------------------------------*/ +@btn-danger-bg: fade(@redash-gray, 10%); +@btn-danger-border: fade(@redash-gray, 15%); + +/* -------------------------------------------------------- + Pagination +-----------------------------------------------------------*/ @pagination-item-size: 33px; @pagination-font-family: @redash-font; @pagination-font-weight-active: normal; @@ -55,7 +60,6 @@ /* -------------------------------------------------------- Table -----------------------------------------------------------*/ - @table-border-radius-base: 0; @table-header-color: #333; @table-header-bg: fade(@redash-gray, 3%); diff --git a/client/app/pages/users/UsersList.jsx b/client/app/pages/users/UsersList.jsx index 7d6af18a1f..2508a490cf 100644 --- a/client/app/pages/users/UsersList.jsx +++ b/client/app/pages/users/UsersList.jsx @@ -2,8 +2,8 @@ import { map } from 'lodash'; import React from 'react'; import PropTypes from 'prop-types'; import { react2angular } from 'react2angular'; -import classNames from 'classnames'; +import Button from 'antd/lib/button'; import { Paginator } from '@/components/Paginator'; import DynamicComponent from '@/components/DynamicComponent'; @@ -27,13 +27,13 @@ function UsersListActions({ user, actions }) { const { enableUser, disableUser, deleteUser } = actions; if (user.is_invitation_pending) { return ( - + ); } return user.is_disabled ? ( - + ) : ( - + ); } @@ -120,14 +120,11 @@ class UsersList extends React.Component { return null; } return ( -
- +
+
);