-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(html): add animation-container and reuse it in tests
- Loading branch information
Showing
59 changed files
with
2,396 additions
and
2,151 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
59 changes: 59 additions & 0 deletions
59
packages/html/src/animation-container/animation-container.spec.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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import { classNames } from '../misc'; | ||
|
||
export const ANIMATION_CONTAINER_CLASSNAME = `k-animation-container`; | ||
|
||
const states = []; | ||
|
||
const options = {}; | ||
|
||
export type KendoAnimationContainerProps = { | ||
positionMode: "absolute" | "fixed"; | ||
offset?: { | ||
top: number | string; | ||
left: number | string; | ||
}; | ||
animationStyle?: React.CSSProperties; | ||
}; | ||
|
||
const defaultProps = { | ||
positionMode: "absolute" | ||
}; | ||
|
||
export const AnimationContainer = ( | ||
props: | ||
KendoAnimationContainerProps & | ||
React.HTMLAttributes<HTMLDivElement> | ||
) => { | ||
const { | ||
positionMode, | ||
animationStyle, | ||
offset, | ||
...other | ||
} = props; | ||
|
||
|
||
return ( | ||
<div | ||
{...other} | ||
style={{ ...offset, ...props.style }} | ||
className={classNames( | ||
ANIMATION_CONTAINER_CLASSNAME, | ||
"k-animation-container-shown", | ||
{ | ||
["k-animation-container-fixed"]: positionMode === "fixed" | ||
} | ||
)} | ||
> | ||
<div className="k-child-animation-container" style={animationStyle}> | ||
{props.children} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
AnimationContainer.states = states; | ||
AnimationContainer.options = options; | ||
AnimationContainer.className = ANIMATION_CONTAINER_CLASSNAME; | ||
AnimationContainer.defaultProps = defaultProps; | ||
|
||
export default AnimationContainer; |
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 @@ | ||
export * from './animation-container.spec'; |
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
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
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
6 changes: 6 additions & 0 deletions
6
packages/html/src/daterangepicker/tests/daterangepicker-opened.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
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
Oops, something went wrong.