Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add allotment component #74

Merged
merged 2 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"@types/react-toastify": "^4.1.0",
"@types/yaml": "^1.9.7",
"aidbox-react": "^1.4.0",
"allotment": "^1.20.2",
"babel-loader": "8.1.0",
"babel-plugin-import": "^1.13.3",
"classnames": "^2.3.1",
Expand Down
33 changes: 33 additions & 0 deletions web/src/components/Cell/Cell.module.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@import 'src/styles/colors';

.title {
display: flex;
line-height: 32px;
margin-bottom: 3px;
}

.container {
width: 100%;
height: 100%;
overflow: auto;
display: flex;
flex-direction: column;
}

.evenContainer {
background-color: $base-light-color;
}

.oddContainer {
background-color: $base-surface-color;
}

.content {
flex: 1;
padding: 20px;
overflow-y: auto;
}

.boxHeader {
position: relative;
}
23 changes: 23 additions & 0 deletions web/src/components/Cell/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import classNames from 'classnames';

import s from './Cell.module.scss';

interface CellProps extends React.HTMLAttributes<HTMLDivElement> {
title?: string;
even?: boolean;
}

export function Cell({ title, children, even }: CellProps) {
const isEven = even ?? false;

return (
<div className={classNames(s.container, isEven ? s.evenContainer : s.oddContainer)}>
<div className={s.content}>
<div className={s.boxHeader}>
<h2 className={s.title}>{title}</h2>
</div>
{children}
</div>
</div>
);
}
74 changes: 0 additions & 74 deletions web/src/components/ExpandableElement/ExpandableElement.module.scss

This file was deleted.

49 changes: 0 additions & 49 deletions web/src/components/ExpandableElement/index.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions web/src/components/ExpandableRow/ExpandableRow.module.scss

This file was deleted.

20 changes: 0 additions & 20 deletions web/src/components/ExpandableRow/index.tsx

This file was deleted.

Loading
Loading