The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 04:45 UTC
| 1 | import { useGT } from "gt-react-native"; |
| 2 | import { Pressable } from "react-native"; |
| 3 | |
| 4 | import { SymbolView } from "./AppSymbol"; |
| 5 | |
| 6 | /** Eye toggle that shows or hides a secret field's typed text. */ |
| 7 | export function SecretRevealButton(props: { |
| 8 | readonly revealed: boolean; |
| 9 | readonly onPress: () => void; |
| 10 | }) { |
| 11 | const gt = useGT(); |
| 12 | return ( |
| 13 | <Pressable |
| 14 | onPress={props.onPress} |
| 15 | hitSlop={6} |
| 16 | accessibilityRole="button" |
| 17 | accessibilityLabel={props.revealed ? gt("Hide secret") : gt("Show secret")} |
| 18 | className="size-10 items-center justify-center" |
| 19 | > |
| 20 | <SymbolView |
| 21 | name={props.revealed ? "eye.slash" : "eye"} |
| 22 | size={18} |
| 23 | tintColorClassName="accent-icon-muted" |
| 24 | /> |
| 25 | </Pressable> |
| 26 | ); |
| 27 | } |