|
@@ -2,13 +2,15 @@ import { Button, Card } from "antd";
|
|
|
|
|
|
|
|
interface IWidgetExerciseCtl {
|
|
interface IWidgetExerciseCtl {
|
|
|
id?: string;
|
|
id?: string;
|
|
|
|
|
+ title?: string;
|
|
|
channel?: string;
|
|
channel?: string;
|
|
|
children?: React.ReactNode;
|
|
children?: React.ReactNode;
|
|
|
}
|
|
}
|
|
|
-const ExerciseCtl = ({ id, channel, children }: IWidgetExerciseCtl) => {
|
|
|
|
|
|
|
+const ExerciseCtl = ({ id, title, channel, children }: IWidgetExerciseCtl) => {
|
|
|
|
|
+ const cardTitle = title ? title : "练习";
|
|
|
return (
|
|
return (
|
|
|
<Card
|
|
<Card
|
|
|
- title="练习"
|
|
|
|
|
|
|
+ title={cardTitle}
|
|
|
extra={<Button type="primary">做练习</Button>}
|
|
extra={<Button type="primary">做练习</Button>}
|
|
|
style={{ backgroundColor: "wheat" }}
|
|
style={{ backgroundColor: "wheat" }}
|
|
|
>
|
|
>
|