style: 添加注释, 解构其他组件属性添加默认值
This commit is contained in:
@@ -1,4 +1,8 @@
|
|||||||
export default function MessageContainer({ children }) {
|
/**
|
||||||
|
* 消息容器
|
||||||
|
* @returns { React.JSX.Element }
|
||||||
|
*/
|
||||||
|
export default function MessageContainer({ children, ...props } = {}) {
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
@@ -7,8 +11,9 @@ export default function MessageContainer({ children }) {
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
paddingTop: '10px',
|
paddingTop: '10px',
|
||||||
paddingBottom: '14px'
|
paddingBottom: '14px'
|
||||||
}}>
|
}}
|
||||||
|
{...props}>
|
||||||
{children}
|
{children}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
export default function SystemMessage({ children }) {
|
/**
|
||||||
|
* 一条系统提示消息
|
||||||
|
* @returns { React.JSX.Element }
|
||||||
|
*/
|
||||||
|
export default function SystemMessage({ children } = {}) {
|
||||||
return (
|
return (
|
||||||
<div style={{
|
<div style={{
|
||||||
width: '100%',
|
width: '100%',
|
||||||
|
|||||||
Reference in New Issue
Block a user