我有以下包装TeamAbout&PlayerList的组件。我想做的就是将样式应用于TeamAbout。我该如何赋予样式?
import React from "react";
import TeamStage from "../TeamStage";
import TeamAbout from "../TeamAbout";
import PlayerList from "../PlayerList";
import styled from "styled-components";
import { StyleTeamDescription } from "./styles";
const TeamPage = props => {
return (
<div>
<TeamStage
/>
<StyleTeamDescription>
<TeamAbout />
<PlayerList
/>
</StyleTeamDescription>
</div>
);
};
我尝试将组件包装在新的const中,但是未应用样式。
<StyleTeamDescription>
<StyleTeamAbout />
<PlayerList />
</StyleTeamDescription>
const StyleTeamAbout = styled(TeamAbout)`
order: 1;
`;
我该怎么办?