Skip to content

Commit

Permalink
multiple changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinKolb committed Oct 19, 2023
1 parent d47448f commit 08f719d
Show file tree
Hide file tree
Showing 30 changed files with 822 additions and 527 deletions.
25 changes: 23 additions & 2 deletions src/components/FieldLink/index.module.css
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
.container {
position: relative;
display: flex;
width: 100%;

&[data-scrollable="true"] {
max-height: 100%;
min-height: 0;
}
}

.link {
border: 1px solid var(--mantine-color-gray-3);
border-radius: var(--mantine-radius-sm);
padding: var(--mantine-spacing-md);
position: relative;
display: block;
width: 100%;

&[data-scrollable="true"] {
overflow-y: auto;
}
}

.legend {
Expand All @@ -11,15 +27,20 @@
position: absolute;
top: calc(-0.5 * var(--legend-font-size));
left: var(--mantine-spacing-lg);

background-color: var(--mantine-color-body);
box-shadow: 0 0 5px var(--mantine-color-body);

font-weight: 500;
font-size: var(--legend-font-size);
line-height: 1;
color: var(--mantine-color-dimmed);

z-index: 10;

& > svg {
vertical-align: bottom;
height: var(--legend-font-size);
width: var(--legend-font-size);
}
}
}
49 changes: 44 additions & 5 deletions src/components/FieldLink/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,57 @@ import classes from "./index.module.css";
import {IconChevronRight} from "@tabler/icons-react";
import {CustomLink} from "../layout/Navigation/Custom/CustomLink.tsx";

export default function FieldLink({children, ariaLabel, legend, ...props}: {
export default function FieldLink({
children,
ariaLabel,
legend,
scrollable,
...props
}: {
legend: string
scrollable?: boolean
children: ReactNode
ariaLabel?: string
} & LinkProps) {
return <CustomLink aria-label={ariaLabel || legend} {...props}>
<div className={classes.container}>

return (
<div className={classes.container} data-scrollable={scrollable}>

<div className={classes.legend}>
{legend}
<IconChevronRight/>
</div>
{children}

<CustomLink
aria-label={ariaLabel || legend} {...props}
className={`${classes.link}`}
data-scrollable={scrollable}
>
{children}
</CustomLink>
</div>
)
}

export function FieldDiv({children, legend, scrollable}: {
legend: string
children: ReactNode
scrollable?: boolean
}) {
return (
<div className={classes.container} data-scrollable={scrollable}>

<div className={classes.legend}>
{legend}
</div>

<div
aria-label={legend}
className={`${classes.link}`}
data-scrollable={scrollable}
>
{children}
</div>
</div>
</CustomLink>
)
}
39 changes: 39 additions & 0 deletions src/components/layout/Navigation/ActionSearch/index.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,42 @@
display: none;
}
}

.group {
display: flex;
align-items: center;
gap: var(--mantine-spacing-xs);
}

.searchResultContainer {
display: flex;
align-items: center;
gap: var(--mantine-spacing-xs);
max-width: 100%;
}

.searchResult {
min-width: 0;
max-width: 100%;

& > * {
font-size: var(--mantine-font-size-md) !important;
font-weight: 400;
color: var(--mantine-color-dimmed);
}
}

.actionList {

& > * {
max-width: 100% !important;

& > * {
& > * {
& > * {
display: block !important;
}
}
}
}
}
Loading

0 comments on commit 08f719d

Please sign in to comment.