Skip to content

feat(design-system): add DsStack component [AR-53842]#351

Merged
vpolessky-dn merged 7 commits intodrivenets:mainfrom
vpolessky-dn:feat/AR-53844-add-stack-component
Apr 15, 2026
Merged

feat(design-system): add DsStack component [AR-53842]#351
vpolessky-dn merged 7 commits intodrivenets:mainfrom
vpolessky-dn:feat/AR-53844-add-stack-component

Conversation

@vpolessky-dn
Copy link
Copy Markdown
Collaborator

No description provided.

@iromanchuk-dn iromanchuk-dn self-requested a review April 8, 2026 15:20
Comment thread packages/design-system/src/components/ds-stack/ds-stack.types.ts Outdated
Comment thread packages/design-system/src/components/ds-stack/index.ts Outdated
Comment thread packages/design-system/src/components/ds-stack/ds-stack.types.ts Outdated
"@zag-js/steps": "^1.37.0",
"classnames": "^2.5.1"
"classnames": "^2.5.1",
"csstype": "^3.2.3"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you tell me where you use this package? I can't find it's imported anywhere.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

csstype is genuinely needed for TypeScript declaration emit (not for runtime).
Added obvious usage case

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk... tbh i don't really understand why we need this component if it's just using plain css as props

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if do not want to redefine properties in the types file this dependency is required

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@vpolessky-dn vpolessky-dn merged commit 30c4bfd into drivenets:main Apr 15, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants