diff --git a/src/components/toggle/Checkbox.tsx b/src/components/toggle/Checkbox.tsx index 9835e15b..08b6d6e3 100644 --- a/src/components/toggle/Checkbox.tsx +++ b/src/components/toggle/Checkbox.tsx @@ -1,8 +1,9 @@ import './Checkbox.css'; import './Toggle.css'; +import './Eye.css'; import { customClassName } from "../../common/types/Helpers"; -export type Skin = "Checkbox" | "Toggle white" | "Toggle black"; +export type Skin = "Checkbox" | "Toggle white" | "Toggle black" | "Eye"; export interface Props { checked: boolean; diff --git a/src/components/toggle/Eye.css b/src/components/toggle/Eye.css new file mode 100644 index 00000000..ba05d608 --- /dev/null +++ b/src/components/toggle/Eye.css @@ -0,0 +1,34 @@ +.Eye { + content: " "; + position: relative; + height: 37px; + width: 50px; +} + +.Eye.clickable { + cursor: pointer; +} + +.Eye.checked:after { + background-image: url("../../img/eye.svg"); +} +.Eye:not(.checked):after { + background-image: url("../../img/eye-closed.svg"); +} + +.Eye:after { + content: " "; + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + background-repeat: no-repeat; + background-position: center; +} + +.Eye.disabled, +.Eye.clickable.disabled { + cursor: default; + opacity: 0.5; +} diff --git a/src/img/eye-closed.svg b/src/img/eye-closed.svg new file mode 100644 index 00000000..2c826d1e --- /dev/null +++ b/src/img/eye-closed.svg @@ -0,0 +1,3 @@ + diff --git a/src/img/eye.svg b/src/img/eye.svg new file mode 100644 index 00000000..d7de87cc --- /dev/null +++ b/src/img/eye.svg @@ -0,0 +1,4 @@ + diff --git a/src/loc/secrets/AddSecretDialog.tsx b/src/loc/secrets/AddSecretDialog.tsx index 91d3e610..8dc82679 100644 --- a/src/loc/secrets/AddSecretDialog.tsx +++ b/src/loc/secrets/AddSecretDialog.tsx @@ -47,6 +47,7 @@ export default function AddSecretDialog(props: Props) { ] } onSubmit={ handleSubmit(submit) } > +
You are about to remove the secret { props.secret?.name }.
-It will be impossible to recover it after, so make your own backup
+You are about to remove the secret { props.secret?.name }:
+It will be impossible to recover it after, so make your own backup of the value:
+