Friday, 14 August, 2020 UTC


In this lesson we’ll create a generic button primitive component the has one style, using [styled-components]( Let’s discuss the API first. Our button will have a default state. ```jsx console.log('henlo')}>Push me ``` Disabled state. Let’s use the `disabled` prop like on a plain HTML `button` element, because our button is an extension of the native HTML button and there’s no need to create a new API when a familiar to developers API already exists: ```jsx Can’t touch this ``` We also want to make sure our button works as a link too: ```jsx Push me ``` We don’t have to implement `as` prop because it’s added to every component by styled-components automatically, but we need to make sure styles don’t break with another HTML element. **We’ll use following libraries:** * [styled-components]( You can either use this lesson’s [Git repository]( or install them manually in your project: ``` npm install styled-components ``` **Useful links and documentation:** * [styled-components docs](