-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
In accordance with #25008, this adds a "Beta" badge with a corresponding tooltip to the header.
- Loading branch information
1 parent
78b9441
commit ccc6b25
Showing
6 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
x-pack/plugins/infra/public/components/beta_badge_header_section.tsx
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,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { EuiBetaBadge, EuiHeaderSection } from '@elastic/eui'; | ||
import React from 'react'; | ||
import styled from 'styled-components'; | ||
|
||
interface BetaBadgeHeaderSectionProps { | ||
tooltipContent?: React.ReactNode; | ||
} | ||
|
||
export const BetaBadgeHeaderSection: React.SFC<BetaBadgeHeaderSectionProps> = ({ | ||
tooltipContent = 'Please help us improve by reporting issues or bugs in the Kibana repo.', | ||
}) => ( | ||
<VerticallyCenteredHeaderSection side="right"> | ||
<EuiBetaBadge label="Beta" tooltipContent={tooltipContent} /> | ||
</VerticallyCenteredHeaderSection> | ||
); | ||
|
||
export const InfrastructureBetaBadgeHeaderSection = () => ( | ||
<BetaBadgeHeaderSection tooltipContent="The Infrastructure UI is still in beta. Please help us improve by reporting issues or bugs in the Kibana repo." /> | ||
); | ||
|
||
export const LogsBetaBadgeHeaderSection = () => ( | ||
<BetaBadgeHeaderSection tooltipContent="The Logs UI is still in beta. Please help us improve by reporting issues or bugs in the Kibana repo." /> | ||
); | ||
|
||
const VerticallyCenteredHeaderSection = styled(EuiHeaderSection)` | ||
padding-left: ${props => props.theme.eui.euiSizeS}; | ||
padding-right: ${props => props.theme.eui.euiSizeS}; | ||
align-items: center; | ||
`; |
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