-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support language switching in Fides JS banner (#4737)
- Loading branch information
1 parent
69379bf
commit e4ec5f7
Showing
19 changed files
with
422 additions
and
66 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
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
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
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,24 @@ | ||
import { h, FunctionComponent } from "preact"; | ||
import { JSXInternal } from "preact/src/jsx"; | ||
|
||
interface MenuItemProps extends JSXInternal.HTMLAttributes<HTMLButtonElement> { | ||
isActive: boolean; | ||
} | ||
|
||
const MenuItem: FunctionComponent<MenuItemProps> = ({ | ||
isActive, | ||
className, | ||
children, | ||
...props | ||
}) => ( | ||
<button | ||
type="button" | ||
aria-pressed={isActive || undefined} | ||
{...props} | ||
className={`fides-banner-button fides-menu-item ${className || ""}`} | ||
> | ||
{children} | ||
</button> | ||
); | ||
|
||
export default MenuItem; |
Oops, something went wrong.