Column readme
There was an attempt to generate following variants, so we don't need to write them manually. It didn't work, because we lost static typing. So even tho generation works as it should, we were not able to use it further in Stitches components, because we were not able to match Stitches typings.
Bellow is the code snippet we tried.
type Span = {
[k: number]: {
gridColumn: string
}
}
const span = Array<null>(12)
.fill(null)
.reduce<Span>(
(acc, _currentValue, index): Span => ({
...acc,
[index]: { gridColumn: `$offset / span ${index}` },
}),
{}
)
type Offset = {
[k: number]:
| {
$offset: number
}
| undefined
}
const offset = Array<null>(12)
.fill(null)
.reduce<Offset>(
(acc, _currentValue, index) => ({
...acc,
[index]: { $offset: index },
}),
{}
)