12 из 115 вопросов — случайная выборка · Ответьте на все и узнайте свой результат
Какой из следующих вариантов корректно импортирует библиотеку styled-components и создаёт переиспользуемый стилизованный компонент Button?
styled-components
Button
import styled from 'styled-components'; const Button = styled.button({ fontSize: '1em', color: 'blue' });
import { styled } from 'react'; const Button = styled.buttonfont-size: 1em; color: blue;;
import { styled } from 'react'; const Button = styled.button
;
import styled from 'styled-components'; const Button = styled.buttonfont-size: 1em; color: blue;;
import styled from 'styled-components'; const Button = styled.button
import CSS from 'styled-components'; const Button = CSS.buttonfont-size: 1em; color: blue;;
import CSS from 'styled-components'; const Button = CSS.button