[React] Extend styles with styled-components in React
发布日期:2021-08-23 22:52:26 浏览次数:2 分类:技术文章

本文共 609 字,大约阅读时间需要 2 分钟。

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;`;

 

转载地址:https://blog.csdn.net/weixin_33804582/article/details/86021134 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:基于Python37配置图片文字识别
下一篇:java解析XML

发表评论

最新留言

关注你微信了!
[***.104.42.241]2024年03月22日 02时30分25秒

关于作者

    喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!

推荐文章