-
-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REFACTOR: migrate DropDown component to TS
- Loading branch information
1 parent
1d44d35
commit b0dd010
Showing
5 changed files
with
64 additions
and
61 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
File renamed without changes.
22 changes: 10 additions & 12 deletions
22
...react-ui-components/src/DropDown/index.js → ...react-ui-components/src/DropDown/index.ts
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,26 +1,24 @@ | ||
import {themr} from '@friendsofreactjs/react-css-themr'; | ||
import identifiers from '../identifiers'; | ||
import style from './style.css'; | ||
|
||
import identifiers from '@neos-project/react-ui-components/src/identifiers'; | ||
import ContextDropDownWrapper, { | ||
StatelessDropDownWrapper, | ||
ContextDropDownHeader, | ||
ContextDropDownContents | ||
} from './wrapper'; | ||
} from '@neos-project/react-ui-components/src/DropDown/wrapper'; | ||
|
||
import style from './style.css'; | ||
|
||
const DropDown = themr(identifiers.dropDown, style)(ContextDropDownWrapper); | ||
const StatelessDropDown = themr(identifiers.dropDown, style)(StatelessDropDownWrapper); | ||
const DropDownHeader = themr(identifiers.dropDownHeader, style)(ContextDropDownHeader); | ||
const DropDownContents = themr(identifiers.dropDownContents, style)(ContextDropDownContents); | ||
|
||
// | ||
// Dependency injection | ||
// | ||
import injectProps from './../_lib/injectProps'; | ||
import Icon from './../Icon'; | ||
|
||
DropDown.Header = injectProps({ | ||
IconComponent: Icon | ||
})(DropDownHeader); | ||
// @ts-ignore | ||
DropDown.Header = DropDownHeader; | ||
// @ts-ignore | ||
DropDown.Contents = DropDownContents; | ||
// @ts-ignore | ||
DropDown.Stateless = StatelessDropDown; | ||
|
||
export default DropDown; |
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