feat(design-system): add DsStack component [AR-53842]#351
Conversation
| "@zag-js/steps": "^1.37.0", | ||
| "classnames": "^2.5.1" | ||
| "classnames": "^2.5.1", | ||
| "csstype": "^3.2.3" |
There was a problem hiding this comment.
Could you tell me where you use this package? I can't find it's imported anywhere.
There was a problem hiding this comment.
csstype is genuinely needed for TypeScript declaration emit (not for runtime).
Added obvious usage case
There was a problem hiding this comment.
i'm seeing this only in a single place and it's used as an import type
can't we import these types from React itself?
There was a problem hiding this comment.
@StyleShit
csstype is needed because ComponentProps<typeof DsStack> forces TypeScript to expand CSS property types in the .d.ts output, and those types come from csstype. Without it as a dependency, TypeScript refuses to emit the declaration file.
There was a problem hiding this comment.
idk... tbh i don't really understand why we need this component if it's just using plain css as props
There was a problem hiding this comment.
if do not want to redefine properties in the types file this dependency is required
There was a problem hiding this comment.
Me and Valentine have looked together into other solutions and they require writing some bolierplate code. This solution is the least effort and has no downsides, except the fact that we need additional package. This solution seems unintuitive, but we can't find a better way. Probably this problem will be resolved by itself with tsdown, typescript, react updates.

No description provided.