aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/components/Inputs/shared.js
blob: 18ba16479e5f7c9424c3dd8b99127697b9b336df (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import styled from "styled-components";
import React from "react";
import FloatingLabel from "../decorators/FloatingLabel";

export const RelPositioning = styled.div`
    position: relative; 
    height: calc(100% - 4em);
`

export const FlexChild = styled.div`
    display: block;
    margin-left: 2em;
`

export const Labelled = ({label, value, children}) => {
  console.log(children)
  return (<FlexChild>
    <RelPositioning>
      <FloatingLabel label={label} value={value} >
        <span>{label}</span>
        {children}
      </FloatingLabel>
    </RelPositioning>
  </FlexChild>)
}