From 82e03978b89938219958032efb1448cc76baa181 Mon Sep 17 00:00:00 2001 From: Saumit Date: Sat, 27 Sep 2025 02:14:26 +0530 Subject: Initial snapshot - OpenTelemetry demo 2.1.3 -f --- .../components/PlatformFlag/PlatformFlag.styled.ts | 25 ++++++++++++++++++++++ .../components/PlatformFlag/PlatformFlag.tsx | 16 ++++++++++++++ src/frontend/components/PlatformFlag/index.ts | 4 ++++ 3 files changed, 45 insertions(+) create mode 100644 src/frontend/components/PlatformFlag/PlatformFlag.styled.ts create mode 100644 src/frontend/components/PlatformFlag/PlatformFlag.tsx create mode 100644 src/frontend/components/PlatformFlag/index.ts (limited to 'src/frontend/components/PlatformFlag') 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 ( + {platform} + ); +}; + +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'; -- cgit v1.2.3