MCPcopy Index your code
hub / github.com/bernaferrari/FigmaToCode / About

Function About

packages/plugin-ui/src/components/About.tsx:28–259  ·  view source on GitHub ↗
({
  useOldPluginVersion = false,
  onPreferenceChanged,
}: AboutProps)

Source from the content-addressed store, hash-verified

26};
27
28const About = ({
29 useOldPluginVersion = false,
30 onPreferenceChanged,
31}: AboutProps) => {
32 const [copied, setCopied] = useState(false);
33
34 const copySelectionJson = async () => {
35 try {
36 // Send message to the plugin to get selection JSON
37 parent.postMessage(
38 { pluginMessage: { type: "get-selection-json" } },
39 "*",
40 );
41
42 setCopied(true);
43 setTimeout(() => setCopied(false), 2000);
44 } catch (error) {
45 console.error("Failed to copy selection JSON:", error);
46 }
47 };
48
49 const togglePluginVersion = () => {
50 onPreferenceChanged("useOldPluginVersion2025", !useOldPluginVersion);
51 };
52
53 return (
54 <div className="flex flex-col p-5 gap-6 text-sm max-w-2xl mx-auto">
55 {/* Header Section with Logo and Title */}
56 <div className="flex flex-col items-center text-center mb-2">
57 <div className="w-16 h-16 bg-linear-to-br from-green-400 to-emerald-600 rounded-xl flex items-center justify-center shadow-lg mb-3">
58 <Code size={32} className="text-white" />
59 </div>
60 <h2 className="text-2xl font-bold mb-1">Figma to Code</h2>
61 <div className="flex items-center gap-1 text-neutral-600 dark:text-neutral-300">
62 <span>Created with</span>
63 <Heart size={14} className="text-red-500 fill-red-500" />
64 <span>by Bernardo Ferrari</span>
65 </div>
66 <div className="mt-3 flex gap-3">
67 <a
68 href="https://github.com/bernaferrari"
69 target="_blank"
70 rel="noopener noreferrer"
71 className="p-2 rounded-full bg-neutral-100 dark:bg-neutral-700 hover:bg-neutral-200 dark:hover:bg-neutral-600 transition-colors"
72 aria-label="GitHub Profile"
73 >
74 <GithubLogo />
75 </a>
76 <a
77 href="https://twitter.com/bernaferrari"
78 target="_blank"
79 rel="noopener noreferrer"
80 className="p-2 rounded-full bg-neutral-100 dark:bg-neutral-700 hover:bg-neutral-200 dark:hover:bg-neutral-600 transition-colors"
81 aria-label="Twitter Profile"
82 >
83 <XLogo />
84 </a>
85 </div>

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected