mirror of https://github.com/msgbyte/tailchat
style: 移除无用组件
parent
e9437be500
commit
8bb320c259
@ -1,9 +0,0 @@
|
|||||||
.plugin-openapi-secret-value {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
.iconify {
|
|
||||||
cursor: pointer;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,25 +0,0 @@
|
|||||||
import { Icon } from '@capital/component';
|
|
||||||
import React, { useState } from 'react';
|
|
||||||
import './SecretValue.less';
|
|
||||||
|
|
||||||
export const SecretValue: React.FC<React.PropsWithChildren> = React.memo(
|
|
||||||
(props) => {
|
|
||||||
const [show, setShow] = useState(false);
|
|
||||||
return (
|
|
||||||
<span className="plugin-openapi-secret-value">
|
|
||||||
{show ? (
|
|
||||||
<>
|
|
||||||
<span>{props.children}</span>
|
|
||||||
<Icon icon="mdi:eye-off-outline" onClick={() => setShow(false)} />
|
|
||||||
</>
|
|
||||||
) : (
|
|
||||||
<>
|
|
||||||
<span>********</span>
|
|
||||||
<Icon icon="mdi:eye-outline" onClick={() => setShow(true)} />
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
SecretValue.displayName = 'SecretValue';
|
|
Loading…
Reference in New Issue