-
Notifications
You must be signed in to change notification settings - Fork 804
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(classroom): add record hint tips (#334)
- Loading branch information
1 parent
becf2b6
commit 134e586
Showing
6 changed files
with
84 additions
and
15 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/renderer-app/src/components/RecordHintTips/RecordHintTips.less
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
.record-hint-tips { | ||
max-width: unset !important; | ||
|
||
.ant-tooltip-inner { | ||
border-radius: 5px; | ||
} | ||
} | ||
|
||
.record-hint-tips-close { | ||
margin-left: 0.5em; | ||
color: currentColor !important; | ||
opacity: 0.7; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import "./RecordHintTips.less"; | ||
|
||
import React, { useContext } from "react"; | ||
import { observer } from "mobx-react-lite"; | ||
import { CloseOutlined } from "@ant-design/icons"; | ||
import { Button, Tooltip } from "antd"; | ||
import { GlobalStoreContext } from "../StoreProvider"; | ||
|
||
export interface RecordHintTipsProps {} | ||
|
||
export const RecordHintTips = observer<RecordHintTipsProps>(function RecordHintTips(props) { | ||
const globalStore = useContext(GlobalStoreContext); | ||
|
||
return ( | ||
<Tooltip | ||
overlayClassName="record-hint-tips" | ||
placement="bottom" | ||
color="rgba(68, 78, 96, 0.72)" | ||
visible={globalStore.isShowRecordHintTips} | ||
title={ | ||
<div> | ||
点击「开始上课」才能录制并生成回放哦~ | ||
<Button | ||
className="record-hint-tips-close" | ||
size="small" | ||
type="text" | ||
icon={<CloseOutlined />} | ||
onClick={globalStore.hideRecordHintTips} | ||
/> | ||
</div> | ||
} | ||
> | ||
{props.children} | ||
</Tooltip> | ||
); | ||
}); | ||
|
||
export default RecordHintTips; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters