소스 검색

feat: Add input group component

Owen Diffey 1 주 전
부모
커밋
4238cf69c1
1개의 변경된 파일63개의 추가작업 그리고 0개의 파일을 삭제
  1. 63 0
      frontend/src/pages/NewStation/Components/InputGroup.vue

+ 63 - 0
frontend/src/pages/NewStation/Components/InputGroup.vue

@@ -0,0 +1,63 @@
+<script lang="ts" setup>
+withDefaults(
+	defineProps<{
+		is?: string | object;
+	}>(),
+	{
+		is: "div"
+	}
+);
+</script>
+
+<template>
+	<component :is="is" class="input_group">
+		<slot />
+	</component>
+</template>
+
+<style lang="less" scoped>
+.input_group {
+	display: flex;
+
+	:deep(&__expanding) {
+		flex-grow: 1;
+		min-width: 0;
+	}
+
+	& > :deep(.btn) {
+		align-self: end;
+		border-radius: 0;
+
+		&:first-child:not(:last-child) {
+			border-radius: 5px 0 0 5px;
+		}
+
+		&:last-child:not(:first-child) {
+			border-radius: 0 5px 5px 0;
+		}
+	}
+
+	& > :deep(.inpt) {
+		.inpt__input {
+			border-radius: 0;
+		}
+
+		&:first-child:not(:last-child) .inpt__input {
+			border-radius: 5px 0 0 5px;
+		}
+
+		&:last-child:not(:first-child) .inpt__input {
+			border-radius: 0 5px 5px 0;
+		}
+
+		&:not(:first-child) .inpt__label {
+			padding-left: 5px;
+			border-left: solid 1px var(--light-grey-1);
+		}
+
+		&:not(:last-child) .inpt__input {
+			border-right-width: 0;
+		}
+	}
+}
+</style>