diff options
| author | jackyzha0 <[email protected]> | 2021-03-07 13:45:21 -0800 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-03-07 13:45:21 -0800 |
| commit | 6150106ae589c4d82eadef0144cce1eab2ac0883 (patch) | |
| tree | 1453354b79a2605fe862136c5ab8877a4d4f7802 /frontend/src/components | |
| parent | fix syntax highlighting on auto detect (diff) | |
| download | ctrl-v-6150106ae589c4d82eadef0144cce1eab2ac0883.tar.xz ctrl-v-6150106ae589c4d82eadef0144cce1eab2ac0883.zip | |
css fix
Diffstat (limited to 'frontend/src/components')
| -rw-r--r-- | frontend/src/components/decorators/Labelled.js | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/frontend/src/components/decorators/Labelled.js b/frontend/src/components/decorators/Labelled.js index 0d7fe39..35cd58a 100644 --- a/frontend/src/components/decorators/Labelled.js +++ b/frontend/src/components/decorators/Labelled.js @@ -3,8 +3,11 @@ import React from "react"; const StyledLabel = styled.label` position: relative; - & > span { - position: absolute; + & > div:first-child { + position: absolute; + } + & > div > span { + display: block; transform: translateY(-0.2em); font-weight: 700; font-size: 1em; @@ -22,9 +25,9 @@ const FloatingLabel = (props) => <StyledLabel label={props.label}> </StyledLabel> -export const Labelled = ({label, value, children}) => <div> - <FloatingLabel label={label} value={value} > +export const Labelled = ({label, value, children}) => <FloatingLabel label={label} value={value} > + <div> <span>{label}</span> - {children} - </FloatingLabel> -</div>
\ No newline at end of file + </div> + {children} +</FloatingLabel>
\ No newline at end of file |