mirror of
https://github.com/umami-software/umami.git
synced 2026-02-06 13:47:15 +01:00
Update ListTable display of items.
This commit is contained in:
parent
934b107e5e
commit
8d85e3fcdb
10 changed files with 115 additions and 21 deletions
|
|
@ -3,11 +3,15 @@ import Link from 'next/link';
|
|||
import { useLocale } from 'components/hooks';
|
||||
import styles from './LinkButton.module.css';
|
||||
|
||||
export function LinkButton({ href, className, children }) {
|
||||
export function LinkButton({ href, className, variant, children }) {
|
||||
const { dir } = useLocale();
|
||||
|
||||
return (
|
||||
<Link className={classNames(styles.button, className)} href={href} dir={dir}>
|
||||
<Link
|
||||
className={classNames(styles.button, className, { [styles[variant]]: true })}
|
||||
href={href}
|
||||
dir={dir}
|
||||
>
|
||||
{children}
|
||||
</Link>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -26,3 +26,82 @@
|
|||
.button:visited {
|
||||
color: var(--base900);
|
||||
}
|
||||
|
||||
.button.disabled {
|
||||
color: var(--disabled-color) !important;
|
||||
background-color: var(--disabled-background) !important;
|
||||
border-color: transparent !important;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.button.primary {
|
||||
color: var(--light50);
|
||||
background: var(--primary400);
|
||||
}
|
||||
|
||||
.button.primary:hover {
|
||||
color: var(--light50);
|
||||
background: var(--primary500);
|
||||
}
|
||||
|
||||
.button.primary:active {
|
||||
color: var(--light50);
|
||||
background: var(--primary600);
|
||||
}
|
||||
|
||||
.button.secondary {
|
||||
border: 1px solid var(--border-color);
|
||||
background: var(--base50);
|
||||
}
|
||||
|
||||
.button.secondary:hover {
|
||||
background: var(--base75);
|
||||
}
|
||||
|
||||
.button.secondary:active {
|
||||
background: var(--base100);
|
||||
}
|
||||
|
||||
.button.quiet {
|
||||
color: var(--base900);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.button.quiet:hover {
|
||||
background: var(--base100);
|
||||
}
|
||||
|
||||
.button.quiet:active {
|
||||
background: var(--base200);
|
||||
}
|
||||
|
||||
.button.danger {
|
||||
color: var(--light50);
|
||||
background: var(--red800);
|
||||
}
|
||||
|
||||
.button.danger:hover {
|
||||
color: var(--light50);
|
||||
background: var(--red900);
|
||||
}
|
||||
|
||||
.button.danger:active {
|
||||
color: var(--light50);
|
||||
background: var(--red1000);
|
||||
}
|
||||
|
||||
.button.size-sm {
|
||||
font-size: var(--font-size-sm);
|
||||
height: calc(var(--base-height) * 0.75);
|
||||
padding: 0 calc(var(--size600) * 0.75);
|
||||
}
|
||||
|
||||
.button.size-md {
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
|
||||
.button.size-lg {
|
||||
font-size: var(--font-size-lg);
|
||||
height: calc(var(--base-height) * 1.25);
|
||||
padding: 0 calc(var(--size600) * 1.25);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export function Pager({ page, pageSize, count, onPageChange, className }) {
|
|||
|
||||
return (
|
||||
<div className={classNames(styles.pager, className)}>
|
||||
<div>{formatMessage(labels.numberOfRecords, { x: count })}</div>
|
||||
<div className={styles.count}>{formatMessage(labels.numberOfRecords, { x: count })}</div>
|
||||
<div className={styles.nav}>
|
||||
<Button onClick={() => handlePageChange(-1)} disabled={firstPage}>
|
||||
<Icon rotate={90}>
|
||||
|
|
|
|||
|
|
@ -16,6 +16,11 @@
|
|||
justify-content: center;
|
||||
}
|
||||
|
||||
.count {
|
||||
color: var(--base600);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 992px) {
|
||||
.pager {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue