({
frameworks,
selectedFramework,
setSelectedFramework,
showAbout,
setShowAbout,
}: FrameworkTabsProps)
| 54 | }; |
| 55 | |
| 56 | const FrameworkTabs = ({ |
| 57 | frameworks, |
| 58 | selectedFramework, |
| 59 | setSelectedFramework, |
| 60 | showAbout, |
| 61 | setShowAbout, |
| 62 | }: FrameworkTabsProps) => { |
| 63 | return ( |
| 64 | <div className="grid grid-cols-4 sm:grid-cols-2 md:grid-cols-4 gap-1 grow"> |
| 65 | {frameworks.map((tab) => ( |
| 66 | <Button |
| 67 | variant="ghost" |
| 68 | size="sm" |
| 69 | key={`tab ${tab}`} |
| 70 | className={`w-full h-8 rounded-md text-sm ${ |
| 71 | selectedFramework === tab && !showAbout |
| 72 | ? "bg-primary text-primary-foreground shadow-xs hover:bg-primary hover:text-primary-foreground dark:hover:bg-primary" |
| 73 | : "bg-muted text-foreground hover:bg-primary/90 hover:text-primary-foreground dark:hover:bg-primary/90" |
| 74 | }`} |
| 75 | onClick={() => { |
| 76 | setSelectedFramework(tab as Framework); |
| 77 | setShowAbout(false); |
| 78 | }} |
| 79 | > |
| 80 | {tab} |
| 81 | </Button> |
| 82 | ))} |
| 83 | </div> |
| 84 | ); |
| 85 | }; |
| 86 | |
| 87 | export const PluginUI = (props: PluginUIProps) => { |
| 88 | const [showAbout, setShowAbout] = useState(false); |
nothing calls this directly
no outgoing calls
no test coverage detected