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

[Bug]: Cannot import HeaderProps.Variant #241

Closed
2 tasks done
tbelmega opened this issue Sep 3, 2022 · 1 comment · Fixed by #245
Closed
2 tasks done

[Bug]: Cannot import HeaderProps.Variant #241

tbelmega opened this issue Sep 3, 2022 · 1 comment · Fixed by #245
Labels
bug Something isn't working

Comments

@tbelmega
Copy link

tbelmega commented Sep 3, 2022

Browser

No response

Package version

3.0.39

React version

No response

Description

I want to create a function and pass Header Variant as well as Table Variant as parameters:

import {TableProps, HeaderProps} from "@cloudscape-design/components";
function createTable(
  headerVariant: HeaderProps.Variant,
  tableVariant: TableProps.Variant,
  ...

Using TableProps.Variant works fine, HeaderProps.Variant results in a type error.
The reason is that table.interfaces.d.ts exports the namespace TableProps, while header/interfaces.d.ts only declares the namespace HeaderProps and doesn't export it.

Source code

No response

Reproduction

No response

Code of Conduct

@tbelmega tbelmega added the bug Something isn't working label Sep 3, 2022
@abdhalees
Copy link
Member

Hello Thiemo,

thanks for the report, we'll work on a fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants