-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(collapsible panel): migrate to TS (#2008)
* refactor(collapsible-panel): change filetypes to TS * refactor(collapsible-panel): add some types (temp commit) * refactor(collapsible-panel): fully migrate to TS, fix test * refactor(collapsible-panel): add changeset * refactor(collapsible-panel): generate readme * refactor(collapsible-panel): format files * refactor(collapsible-panel): implement refactor feedback * refactor(collapsible-panel): implement extract defaultProps to a variable
- Loading branch information
Showing
14 changed files
with
252 additions
and
198 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-uikit/collapsible-motion': patch | ||
--- | ||
|
||
Update types for props |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@commercetools-uikit/collapsible-panel': patch | ||
--- | ||
|
||
Migrate to Typescript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
10 changes: 5 additions & 5 deletions
10
...ble-panel/src/collapsible-panel-header.js → ...le-panel/src/collapsible-panel-header.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
import PropTypes from 'prop-types'; | ||
import { ReactNode } from 'react'; | ||
import Text from '@commercetools-uikit/text'; | ||
|
||
const CollapsiblePanelHeader = (props) => ( | ||
type TCollapsiblePanelHeader = { | ||
children: ReactNode; | ||
}; | ||
const CollapsiblePanelHeader = (props: TCollapsiblePanelHeader) => ( | ||
<Text.Subheadline as="h4" isBold={true} truncate={true}> | ||
{props.children} | ||
</Text.Subheadline> | ||
); | ||
|
||
CollapsiblePanelHeader.displayName = 'CollapsiblePanelHeader'; | ||
CollapsiblePanelHeader.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
}; | ||
|
||
export default CollapsiblePanelHeader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
537e696
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: