mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-09 00:18:00 +01:00
Merge pull request #483 from Unleash/fix/add-highlight-row
add highlight to table rows for features
This commit is contained in:
commit
855c1ccaf8
@ -1,6 +1,11 @@
|
|||||||
import { makeStyles } from '@material-ui/core/styles';
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
|
|
||||||
export const useStyles = makeStyles(theme => ({
|
export const useStyles = makeStyles(theme => ({
|
||||||
|
tableRow: {
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.grey[200],
|
||||||
|
},
|
||||||
|
},
|
||||||
container: {
|
container: {
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
flexWrap: 'wrap',
|
flexWrap: 'wrap',
|
||||||
|
@ -161,7 +161,7 @@ const ApiTokenList = ({ location }: IApiTokenList) => {
|
|||||||
<TableBody>
|
<TableBody>
|
||||||
{tokens.map(item => {
|
{tokens.map(item => {
|
||||||
return (
|
return (
|
||||||
<TableRow key={item.secret}>
|
<TableRow key={item.secret} className={styles.tableRow}>
|
||||||
<TableCell
|
<TableCell
|
||||||
align="left"
|
align="left"
|
||||||
className={styles.hideSM}
|
className={styles.hideSM}
|
||||||
|
@ -4,6 +4,9 @@ export const useStyles = makeStyles(theme => ({
|
|||||||
listItem: {
|
listItem: {
|
||||||
padding: '0',
|
padding: '0',
|
||||||
margin: '1rem 0',
|
margin: '1rem 0',
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.grey[200],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
listItemMetric: {
|
listItemMetric: {
|
||||||
width: '40px',
|
width: '40px',
|
||||||
|
@ -3,6 +3,9 @@ import { makeStyles } from '@material-ui/core/styles';
|
|||||||
export const useStyles = makeStyles(theme => ({
|
export const useStyles = makeStyles(theme => ({
|
||||||
tableRow: {
|
tableRow: {
|
||||||
cursor: 'pointer',
|
cursor: 'pointer',
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.grey[200],
|
||||||
|
},
|
||||||
},
|
},
|
||||||
tableCell: {
|
tableCell: {
|
||||||
border: 'none',
|
border: 'none',
|
||||||
|
@ -7,6 +7,9 @@ export const useStyles = makeStyles(theme => ({
|
|||||||
textDecoration: 'none',
|
textDecoration: 'none',
|
||||||
color: 'inherit',
|
color: 'inherit',
|
||||||
},
|
},
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.grey[200],
|
||||||
|
}
|
||||||
},
|
},
|
||||||
deprecated: {
|
deprecated: {
|
||||||
'& a': {
|
'& a': {
|
||||||
|
@ -0,0 +1,12 @@
|
|||||||
|
import { makeStyles } from '@material-ui/core/styles';
|
||||||
|
|
||||||
|
export const useStyles = makeStyles(theme => ({
|
||||||
|
tableRow: {
|
||||||
|
'&:hover': {
|
||||||
|
backgroundColor: theme.palette.grey[200],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
leftTableCell:{
|
||||||
|
textAlign: 'left'
|
||||||
|
}
|
||||||
|
}));
|
@ -12,6 +12,7 @@ import ConditionallyRender from '../../../../../component/common/ConditionallyRe
|
|||||||
import { formatDateWithLocale } from '../../../../../component/common/util';
|
import { formatDateWithLocale } from '../../../../../component/common/util';
|
||||||
import AccessContext from '../../../../../contexts/AccessContext';
|
import AccessContext from '../../../../../contexts/AccessContext';
|
||||||
import { IUser } from '../../../../../interfaces/user';
|
import { IUser } from '../../../../../interfaces/user';
|
||||||
|
import { useStyles } from './UserListItem.styles';
|
||||||
|
|
||||||
interface IUserListItemProps {
|
interface IUserListItemProps {
|
||||||
user: IUser;
|
user: IUser;
|
||||||
@ -35,9 +36,10 @@ const UserListItem = ({
|
|||||||
location,
|
location,
|
||||||
}: IUserListItemProps) => {
|
}: IUserListItemProps) => {
|
||||||
const { hasAccess } = useContext(AccessContext);
|
const { hasAccess } = useContext(AccessContext);
|
||||||
|
const styles = useStyles();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<TableRow key={user.id}>
|
<TableRow key={user.id} className={styles.tableRow}>
|
||||||
<TableCell>
|
<TableCell>
|
||||||
<Avatar
|
<Avatar
|
||||||
data-loading
|
data-loading
|
||||||
@ -53,12 +55,12 @@ const UserListItem = ({
|
|||||||
{formatDateWithLocale(user.createdAt, location.locale)}
|
{formatDateWithLocale(user.createdAt, location.locale)}
|
||||||
</span>
|
</span>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell style={{ textAlign: 'left' }}>
|
<TableCell className={styles.leftTableCell}>
|
||||||
<Typography variant="body2" data-loading>
|
<Typography variant="body2" data-loading>
|
||||||
{user.name}
|
{user.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
<TableCell style={{ textAlign: 'left' }}>
|
<TableCell className={styles.leftTableCell}>
|
||||||
<Typography variant="body2" data-loading>
|
<Typography variant="body2" data-loading>
|
||||||
{user.username || user.email}
|
{user.username || user.email}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
Loading…
Reference in New Issue
Block a user