diff options
| author | Saumit <justsaumit@protonmail.com> | 2025-09-27 02:14:26 +0530 |
|---|---|---|
| committer | Saumit <justsaumit@protonmail.com> | 2025-09-27 02:14:26 +0530 |
| commit | 82e03978b89938219958032efb1448cc76baa181 (patch) | |
| tree | 626f3e54d52ecd49be0ed3bee30abacc0453d081 /src/frontend/components/PlatformFlag | |
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'src/frontend/components/PlatformFlag')
| -rw-r--r-- | src/frontend/components/PlatformFlag/PlatformFlag.styled.ts | 25 | ||||
| -rw-r--r-- | src/frontend/components/PlatformFlag/PlatformFlag.tsx | 16 | ||||
| -rw-r--r-- | src/frontend/components/PlatformFlag/index.ts | 4 |
3 files changed, 45 insertions, 0 deletions
diff --git a/src/frontend/components/PlatformFlag/PlatformFlag.styled.ts b/src/frontend/components/PlatformFlag/PlatformFlag.styled.ts new file mode 100644 index 0000000..3ac0733 --- /dev/null +++ b/src/frontend/components/PlatformFlag/PlatformFlag.styled.ts @@ -0,0 +1,25 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import styled from 'styled-components'; + +export const Block = styled.div` + position: absolute; + bottom: 0; + right: 0; + width: 100px; + height: 27px; + display: flex; + justify-content: center; + align-items: center; + font-size: ${({ theme }) => theme.sizes.mSmall}; + font-weight: ${({ theme }) => theme.fonts.regular}; + color: ${({ theme }) => theme.colors.white}; + background: ${({ theme }) => theme.colors.otelYellow}; + + ${({ theme }) => theme.breakpoints.desktop} { + width: 190px; + height: 50px; + font-size: ${({ theme }) => theme.sizes.dSmall}; + } +`; diff --git a/src/frontend/components/PlatformFlag/PlatformFlag.tsx b/src/frontend/components/PlatformFlag/PlatformFlag.tsx new file mode 100644 index 0000000..80a01ca --- /dev/null +++ b/src/frontend/components/PlatformFlag/PlatformFlag.tsx @@ -0,0 +1,16 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +import * as S from './PlatformFlag.styled'; + +const { NEXT_PUBLIC_PLATFORM = 'local' } = typeof window !== 'undefined' ? window.ENV : {}; + +const platform = NEXT_PUBLIC_PLATFORM; + +const PlatformFlag = () => { + return ( + <S.Block>{platform}</S.Block> + ); +}; + +export default PlatformFlag; diff --git a/src/frontend/components/PlatformFlag/index.ts b/src/frontend/components/PlatformFlag/index.ts new file mode 100644 index 0000000..ea744bb --- /dev/null +++ b/src/frontend/components/PlatformFlag/index.ts @@ -0,0 +1,4 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +export { default } from './PlatformFlag'; |
