ref(keyboard-avoider) Don't use styled components (#12420)
This commit is contained in:
parent
601e21ffcd
commit
af0715dc17
|
@ -1,14 +1,9 @@
|
|||
// @flow
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { isIosMobileBrowser } from '../../../base/environment/utils';
|
||||
|
||||
const Avoider = styled.div`
|
||||
height: ${props => props.elementHeight}px;
|
||||
`;
|
||||
|
||||
/**
|
||||
* Component that renders an element to lift the chat input above the Safari keyboard,
|
||||
* computing the appropriate height comparisons based on the {@code visualViewport}.
|
||||
|
@ -54,7 +49,7 @@ function KeyboardAvoider() {
|
|||
};
|
||||
}, []);
|
||||
|
||||
return <Avoider elementHeight = { elementHeight } />;
|
||||
return <div style = {{ height: `${elementHeight}px` }} />;
|
||||
}
|
||||
|
||||
export default KeyboardAvoider;
|
||||
|
|
Loading…
Reference in New Issue