这提供了一种主题设计方法,但从react 18和下一个版本开始,我就无法在我的系统中使用theme.js。下面这个按钮的样式对我来说是有效的,但我需要这种css的可重复使用性。
<Button css={css`
display: flex;
align-items: center;
justify-content: center;
background-color: black;
color: white;
font-size: 10px;
padding: 10px 60px;
border-radius: 5px;
margin: 10px 0px;
cursor: pointer;
margin-left: 10px;
:hover {
color: #3e2723;
border:2px solid #3e2723;
border-color: #3e2723;
transition: border-color 0s ease-out 0.6s, width 0.3s ease-out 0.6s, height 0.3s ease-out .7s;
}
`}> Click for More </Button>