Summary:
We were using `fill={true}` as an attribute to make flexbox containers fill the entire available space.
However, `fill` is an HTML attribute (see: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/fill) This caused warnings printed to the console.
This diff renames the attribute to `grow` with is also more in line with the Flexbox terminology.
Reviewed By: priteshrnandgaonkar
Differential Revision: D10488389
fbshipit-source-id: ed8553c6203cdf6df94d26c731164ecec4c9fbd2
18 lines
444 B
JavaScript
18 lines
444 B
JavaScript
/**
|
|
* Copyright 2018-present Facebook.
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
* @format
|
|
*/
|
|
|
|
import styled from '../styled/index.js';
|
|
|
|
const View = styled('div')(props => ({
|
|
height: props.grow ? '100%' : 'auto',
|
|
overflow: props.scrollable ? 'auto' : 'visible',
|
|
position: 'relative',
|
|
width: props.grow ? '100%' : 'auto',
|
|
}));
|
|
|
|
export default View;
|