forked from proofcarryingdata/zupass
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Redact personal details when ZK mode is enabled (proofcarryingdata#1033)
Closes proofcarryingdata#1002 https://github.com/proofcarryingdata/zupass/assets/20022/9df8ba06-cfef-43c1-a6d3-0e605fcabda2
- Loading branch information
Showing
3 changed files
with
39 additions
and
5 deletions.
There are no files selected for viewing
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,26 @@ | ||
import styled, { css } from "styled-components"; | ||
|
||
export const RedactedText = styled.div<{ redacted: boolean }>` | ||
${({ redacted }) => | ||
redacted | ||
? css` | ||
background-color: var(--bg-dark-primary); | ||
color: var(--bg-dark-primary); | ||
&:before { | ||
content: "REDACTED"; | ||
color: white; | ||
font-weight: bold; | ||
left: 25%; | ||
position: absolute; | ||
} | ||
` | ||
: css``} | ||
border-radius: 4px; | ||
margin-bottom: 4px; | ||
padding: 2px; | ||
position: relative; | ||
transition-property: color, background-color; | ||
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); | ||
/* Same duration as the toggle slide */ | ||
transition-duration: 300ms; | ||
`; |
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