summaryrefslogtreecommitdiff
path: root/src/frontend/components/Select
diff options
context:
space:
mode:
authorSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
committerSaumit <justsaumit@protonmail.com>2025-09-27 02:14:26 +0530
commit82e03978b89938219958032efb1448cc76baa181 (patch)
tree626f3e54d52ecd49be0ed3bee30abacc0453d081 /src/frontend/components/Select
Initial snapshot - OpenTelemetry demo 2.1.3 -f
Diffstat (limited to 'src/frontend/components/Select')
-rw-r--r--src/frontend/components/Select/Select.styled.ts31
-rw-r--r--src/frontend/components/Select/Select.tsx20
-rw-r--r--src/frontend/components/Select/index.ts4
3 files changed, 55 insertions, 0 deletions
diff --git a/src/frontend/components/Select/Select.styled.ts b/src/frontend/components/Select/Select.styled.ts
new file mode 100644
index 0000000..319ee59
--- /dev/null
+++ b/src/frontend/components/Select/Select.styled.ts
@@ -0,0 +1,31 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+import styled from 'styled-components';
+
+export const Select = styled.select`
+ width: 100%;
+ height: 45px;
+ border: 1px solid ${({ theme }) => theme.colors.borderGray};
+ padding: 10px 16px;
+ border-radius: 8px;
+ position: relative;
+ width: 100px;
+ cursor: pointer;
+`;
+
+export const SelectContainer = styled.div`
+ position: relative;
+ width: min-content;
+`;
+
+export const Arrow = styled.img.attrs({
+ src: '/icons/Chevron.svg',
+ alt: 'select',
+})`
+ position: absolute;
+ right: 25px;
+ top: 20px;
+ width: 10px;
+ height: 5px;
+`;
diff --git a/src/frontend/components/Select/Select.tsx b/src/frontend/components/Select/Select.tsx
new file mode 100644
index 0000000..a1f7e2a
--- /dev/null
+++ b/src/frontend/components/Select/Select.tsx
@@ -0,0 +1,20 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+import { InputHTMLAttributes } from 'react';
+import * as S from './Select.styled';
+
+interface IProps extends InputHTMLAttributes<HTMLSelectElement> {
+ children: React.ReactNode;
+}
+
+const Select = ({ children, ...props }: IProps) => {
+ return (
+ <S.SelectContainer>
+ <S.Select {...props}>{children}</S.Select>
+ <S.Arrow />
+ </S.SelectContainer>
+ );
+};
+
+export default Select;
diff --git a/src/frontend/components/Select/index.ts b/src/frontend/components/Select/index.ts
new file mode 100644
index 0000000..2f51fcd
--- /dev/null
+++ b/src/frontend/components/Select/index.ts
@@ -0,0 +1,4 @@
+// Copyright The OpenTelemetry Authors
+// SPDX-License-Identifier: Apache-2.0
+
+export { default } from './Select';