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

feat: create dashboard files #256

Merged
merged 1 commit into from
Aug 16, 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
30 changes: 30 additions & 0 deletions dev/pages/DashboardLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { DashboardLayout } from '../../packages/react-components-pro/src/DashboardLayout.js';
import type { CSSProperties } from 'react';

const dashboardLayoutItemStyle = {
backgroundColor: '#f5f5f5',
border: '1px solid #e0e0e0',
borderRadius: '4px',
padding: '1em',
textAlign: 'center',
margin: '0.5em',
boxSizing: 'border-box',
height: '100px',
} as CSSProperties;

const dashboardLayoutStyle = {
'--vaadin-dashboard-col-min-width': '200px',
'--vaadin-dashboard-col-max-width': '300px',
} as CSSProperties;

export default function () {
return (
<DashboardLayout style={dashboardLayoutStyle}>
<div style={dashboardLayoutItemStyle}>Item 0</div>
<div style={dashboardLayoutItemStyle}>Item 1</div>
<div style={dashboardLayoutItemStyle}>Item 2</div>
<div style={dashboardLayoutItemStyle}>Item 3</div>
<div style={dashboardLayoutItemStyle}>Item 4</div>
</DashboardLayout>
);
}
16 changes: 16 additions & 0 deletions packages/react-components-pro/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@vaadin/charts": "24.5.0-alpha8",
"@vaadin/cookie-consent": "24.5.0-alpha8",
"@vaadin/crud": "24.5.0-alpha8",
"@vaadin/dashboard": "24.6.0-alpha0",
"@vaadin/grid-pro": "24.5.0-alpha8",
"@vaadin/map": "24.5.0-alpha8",
"@vaadin/react-components": "24.5.0-alpha8",
Expand Down Expand Up @@ -99,6 +100,18 @@
"types": "./CrudEditColumn.d.ts",
"default": "./CrudEditColumn.js"
},
"./Dashboard.js": {
"types": "./Dashboard.d.ts",
"default": "./Dashboard.js"
},
"./DashboardLayout.js": {
"types": "./DashboardLayout.d.ts",
"default": "./DashboardLayout.js"
},
"./DashboardWidget.js": {
"types": "./DashboardWidget.d.ts",
"default": "./DashboardWidget.js"
},
"./GridPro.js": {
"types": "./GridPro.d.ts",
"default": "./GridPro.js"
Expand All @@ -123,6 +136,9 @@
"./Crud": "./Crud.js",
"./CrudEdit": "./CrudEdit.js",
"./CrudEditColumn": "./CrudEditColumn.js",
"./Dashboard": "./Dashboard.js",
"./DashboardLayout": "./DashboardLayout.js",
"./DashboardWidget": "./DashboardWidget.js",
"./GridPro": "./GridPro.js",
"./GridProEditColumn": "./GridProEditColumn.js",
"./Map": "./Map.js",
Expand Down
1 change: 1 addition & 0 deletions packages/react-components-pro/src/Dashboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './generated/Dashboard.js';
1 change: 1 addition & 0 deletions packages/react-components-pro/src/DashboardLayout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './generated/DashboardLayout.js';
1 change: 1 addition & 0 deletions packages/react-components-pro/src/DashboardWidget.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './generated/DashboardWidget.js';