[React] Extend styles with styled-components in React
发布时间:2020-12-15 20:21:48 所属栏目:百科 来源:网络整理
导读:In this lesson,you will learn how to extend styles from one styled-component to another in a React app. This is helpful when you have two styled-components that are similar but differ in one or more CSs properties. ? import styled from ‘s
In this lesson,you will learn how to extend styles from one styled-component to another in a React app. This is helpful when you have two styled-components that are similar but differ in one or more CSs properties. ? import styled from ‘styled-components‘; export const Button = styled.button` background-color: #FF851B; border-radius: 5px; color: white; display: block; font-weight: bold; font-size: 22px; padding: 16px 32px; text-transform: uppercase; margin: 100px auto; `; export const HelpButton = styled(Button)` background-color: #FF4136; margin: 15px; position: fixed; bottom: 0; right: 0; `; (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
- ruby – pik错误:私有方法`gsub’调用nil:NilC
- cocos 2d test-cpp 学习笔记之AppDelegate.cpp 代
- 正则表达式 – 在Perl中,有没有${foo [bar]}可能
- oracle – PL / SQL中是否有散列函数?
- objective-c – 在applicationState之后收到的UI
- freescale飞思卡尔 HCS12 系列单片机bootloader详
- C++ adjacent_find(STL adjacent_find)算法使用详
- Swift 3 UITableView数据源方法viewForHeaderInS
- 如何解决AJAX 的缓存
- Oracle数据库SQL语句绑定变量二----安全问题
热点阅读