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

OptionsTile: size marked as mandatory but also optional #5702

Closed
2 tasks done
wkeese opened this issue Jul 21, 2024 · 0 comments · Fixed by #5846
Closed
2 tasks done

OptionsTile: size marked as mandatory but also optional #5702

wkeese opened this issue Jul 21, 2024 · 0 comments · Fixed by #5846
Assignees
Labels
area: typescript component: OptionsTile role: dev Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. type: bug 🐛 Something isn't working

Comments

@wkeese
Copy link
Contributor

wkeese commented Jul 21, 2024

Package

Carbon for IBM Products

Description

For OptionsTile, the Typescript declaration says that specifying size is mandatory:

/**
 * Define the size of the OptionsTile.
 */
size: 'lg' | 'xl';

However, the PropTypes and also the code says that it's optional:

// Default values for props
const defaults = {
  size: 'lg' as const,
};

...

export let OptionsTile = React.forwardRef(
  (
    {
      children,
     ...
      size = defaults.size,

...

/**
 * Define the size of the OptionsTile.
 */
/**@ts-ignore*/
size: PropTypes.oneOf(['lg', 'xl']),

Presumably the Typescript declaration needs to be updated to mark it as optional.

See also related ticket #4576.

Component(s) impacted

OptionsTile

Browser

Chrome

@carbon/ibm-products (previously @carbon/ibm-cloud-cognitive) version

2.45.0

Suggested Severity

None

Product/offering

IKC

CodeSandbox or Stackblitz example

https://carbon-for-ibm-products.netlify.app/?path=/docs/ibm-products-components-options-tile-optionstile--docs

Steps to reproduce the issue (if applicable)

No response

Release date (if applicable)

No response

Code of Conduct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: typescript component: OptionsTile role: dev Sev 3 Visible or noticeable to users but does not impede functionality. Has a workaround. type: bug 🐛 Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants