Skip to content

chore: types for TableExpandHeader props#13985

Merged
kodiakhq[bot] merged 2 commits into
carbon-design-system:mainfrom
imp-dance:12524-types-for-tableexpandheader-props
Jun 14, 2023
Merged

chore: types for TableExpandHeader props#13985
kodiakhq[bot] merged 2 commits into
carbon-design-system:mainfrom
imp-dance:12524-types-for-tableexpandheader-props

Conversation

@imp-dance

@imp-dance imp-dance commented Jun 13, 2023

Copy link
Copy Markdown
Contributor

Closes #12524

Changelog

  • TableExpandHeader.js -> TableExpandHeader.tsx
  • Added Typescript props definition for TableExpandHeader

Additional comments

The props I've made are "strict", meaning that I respect the requiredIfGivenPropIsTruthy utils used in the proptypes definition.

<TableExpandHeader /> // ✅ valid
<TableExpandHeader enableExpando={false} /> // ✅ valid

<TableExpandHeader enableExpando /> // ❎ not valid
<TableExpandHeader enableExpando ariaLabel="" onExpand={() => {}} /> //  valid

<TableExpandHeader enableToggle /> // ❎ not valid
<TableExpandHeader enableToggle ariaLabel="" onExpand={() => {}} /> // ✅ valid

@imp-dance imp-dance requested a review from a team as a code owner June 13, 2023 08:21
@netlify

netlify Bot commented Jun 13, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-components-react ready!

Name Link
🔨 Latest commit aab4165
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/648a270e898b3c00089c1979
😎 Deploy Preview https://deploy-preview-13985--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify

netlify Bot commented Jun 13, 2023

Copy link
Copy Markdown

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit aab4165
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/648a270eeea46f0008d12fdc
😎 Deploy Preview https://deploy-preview-13985--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@francinelucca francinelucca left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@kodiakhq kodiakhq Bot merged commit 81e2fb9 into carbon-design-system:main Jun 14, 2023
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.

Add TypeScript types to TableExpandHeader

3 participants