mirror of
https://github.com/dbeaver/cloudbeaver.git
synced 2026-10-13 16:18:51 +08:00
CB-4417 :refactor Version to module styles
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
.tableColumnValueExpand {
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -6,34 +6,28 @@
|
||||
* you may not use this file except in compliance with the License.
|
||||
*/
|
||||
import { observer } from 'mobx-react-lite';
|
||||
import styled, { css } from 'reshadow';
|
||||
|
||||
import { TableColumnValue, TableItem, TableItemExpand, useStyles } from '@cloudbeaver/core-blocks';
|
||||
import { s, TableColumnValue, TableItem, TableItemExpand, useS } from '@cloudbeaver/core-blocks';
|
||||
import type { IVersion } from '@cloudbeaver/core-version';
|
||||
|
||||
import styles from './Version.m.css';
|
||||
import { VersionInfo } from './VersionInfo';
|
||||
|
||||
const styles = css`
|
||||
TableColumnValue[expand] {
|
||||
cursor: pointer;
|
||||
}
|
||||
TableColumnValue[|gap] {
|
||||
gap: 16px;
|
||||
}
|
||||
`;
|
||||
|
||||
interface Props {
|
||||
version: IVersion;
|
||||
}
|
||||
|
||||
export const Version = observer<Props>(function Version({ version }) {
|
||||
return styled(useStyles(styles))(
|
||||
const style = useS(styles);
|
||||
return (
|
||||
<TableItem item={version.number} expandElement={VersionInfo}>
|
||||
<TableColumnValue centerContent flex expand>
|
||||
<TableColumnValue className={s(style, { tableColumnValueExpand: true })} centerContent flex expand>
|
||||
<TableItemExpand />
|
||||
</TableColumnValue>
|
||||
<TableColumnValue expand>{version.number}</TableColumnValue>
|
||||
<TableColumnValue className={s(style, { tableColumnValueExpand: true })} expand>
|
||||
{version.number}
|
||||
</TableColumnValue>
|
||||
<TableColumnValue>{version.date}</TableColumnValue>
|
||||
</TableItem>,
|
||||
</TableItem>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user