feat: first commit
This commit is contained in:
8
src/components/safe-bottom-padding/index.less
Normal file
8
src/components/safe-bottom-padding/index.less
Normal file
@ -0,0 +1,8 @@
|
||||
.safe-bottom-padding {
|
||||
width: 100%;
|
||||
min-width: 1px;
|
||||
/* 兼容 iOS < 11.2 */
|
||||
height: constant(safe-area-inset-bottom);
|
||||
/* 兼容 iOS >= 11.2 */
|
||||
height: env(safe-area-inset-bottom);
|
||||
}
|
||||
15
src/components/safe-bottom-padding/index.tsx
Normal file
15
src/components/safe-bottom-padding/index.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
import classNames from 'classnames';
|
||||
|
||||
import './index.less';
|
||||
|
||||
interface IProps {
|
||||
className?: string;
|
||||
}
|
||||
|
||||
const SAFE_BOTTOM_PADDING_CLASS = 'safe-bottom-padding';
|
||||
|
||||
function SafeBottomPadding(props: IProps) {
|
||||
return <div className={classNames(SAFE_BOTTOM_PADDING_CLASS, props.className)} />;
|
||||
}
|
||||
|
||||
export default SafeBottomPadding;
|
||||
Reference in New Issue
Block a user