* fix(frontend): Refactor apps to support multiples breakpoints * fix(frontend): WIP * fix(frontend): redo apps page * fix(frontend): Hide schema for buttons * fix(frontend): Add apps menu * fix(frontend): Properly handle runnable delete * fix(frontend): simplify ui * fix(frontend): unify flow * fix(frontend): table action design * fix(frontend): reework runnable pick * fix(frontend): fix apps action * fix(frontend): Highlight output * fix(frontend): Fix dimensions * fix(frontend): Hide alert on button component * fix(frontend): add number of actions when a table is selected
34 lines
788 B
TypeScript
34 lines
788 B
TypeScript
import type { GridItem } from './types'
|
|
|
|
type ColumnConfiguration = [number, number][]
|
|
|
|
const Breakpoints = {
|
|
sm: 640,
|
|
lg: 1024
|
|
}
|
|
|
|
const columnConfiguration: ColumnConfiguration = [
|
|
[Breakpoints.lg, 12],
|
|
[Breakpoints.sm, 3]
|
|
]
|
|
|
|
const gridColumns = columnConfiguration.map((value) => value[1])
|
|
|
|
function disableDrag(component: GridItem): GridItem {
|
|
gridColumns.forEach((column: number) => {
|
|
component[column].customDragger = true
|
|
component[column].customResizer = true
|
|
})
|
|
return component
|
|
}
|
|
|
|
function enableDrag(component: GridItem): GridItem {
|
|
gridColumns.forEach((column: number) => {
|
|
component[column].customDragger = false
|
|
component[column].customResizer = false
|
|
})
|
|
return component
|
|
}
|
|
|
|
export { gridColumns, columnConfiguration, disableDrag, enableDrag, Breakpoints }
|