/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native/ReactCommon/react/renderer/components/safeareaview/SafeAreaViewState.h
42 строки
900 B
Alan Lee
Add Android version of SafeAreaView (#46246)
03 сен 2024, 01:44
03 сен 2024, 01:44
ade863a
Код
Авторство
О чём код?
/* * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #pragma once #include <react/renderer/graphics/RectangleEdges.h> #ifdef ANDROID #include <folly/dynamic.h> #endif namespace facebook::react { /* * State for <SafeAreaView> component. */ class SafeAreaViewState final { public: #ifdef ANDROID SafeAreaViewState() = default; SafeAreaViewState( const SafeAreaViewState& /*previousState*/, folly::dynamic data) : padding(EdgeInsets{ (Float)data["left"].getDouble(), (Float)data["top"].getDouble(), (Float)data["right"].getDouble(), (Float)data["bottom"].getDouble(), }){}; folly::dynamic getDynamic() const; #endif EdgeInsets padding{}; }; } // namespace facebook::react