Skip to content

Commit

Permalink
Merge pull request #74 from beda-software/add-allotment
Browse files Browse the repository at this point in the history
Add allotment component
  • Loading branch information
projkov authored Jun 13, 2024
2 parents 7d3b2bf + 4a7199a commit e29c8b6
Show file tree
Hide file tree
Showing 9 changed files with 201 additions and 262 deletions.
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

0 comments on commit e29c8b6

Please sign in to comment.