Например, как я могу получить высоту (100px) внешней теги в коде ниже? < /p>
Код: Выделить всё
import React from "react";
import ReactDOM from "react-dom";
import styled from "styled-components";
import "./styles.css";
function App() {
const Outer = styled.div`
height: "100px";
border: 1px solid black;
`;
return (
Inside
);
}
const rootElement = document.getElementById("root");
ReactDOM.render(, rootElement);
Подробнее здесь: https://stackoverflow.com/questions/556 ... components
Мобильная версия