This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
2017-09-04 21:48:56 +00:00
|
|
|
// @flow
|
2020-06-20 20:59:15 +00:00
|
|
|
import * as React from "react";
|
|
|
|
import { observer } from "mobx-react";
|
2020-07-10 05:33:07 +00:00
|
|
|
import Flex from "components/Flex";
|
2020-06-20 20:59:15 +00:00
|
|
|
import styled from "styled-components";
|
2017-09-04 21:48:56 +00:00
|
|
|
|
|
|
|
type Props = {
|
2018-05-05 23:16:08 +00:00
|
|
|
label: React.Node | string,
|
|
|
|
children: React.Node,
|
2017-09-04 21:48:56 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const Labeled = ({ label, children, ...props }: Props) => (
|
|
|
|
<Flex column {...props}>
|
2017-11-08 06:02:07 +00:00
|
|
|
<Label>{label}</Label>
|
2017-09-04 21:48:56 +00:00
|
|
|
{children}
|
|
|
|
</Flex>
|
|
|
|
);
|
|
|
|
|
2017-11-08 06:02:07 +00:00
|
|
|
export const Label = styled(Flex)`
|
2018-06-10 02:10:30 +00:00
|
|
|
margin-bottom: 8px;
|
2017-09-04 21:48:56 +00:00
|
|
|
font-size: 13px;
|
|
|
|
font-weight: 500;
|
|
|
|
text-transform: uppercase;
|
2020-08-09 01:53:11 +00:00
|
|
|
color: ${(props) => props.theme.textTertiary};
|
2017-09-04 21:48:56 +00:00
|
|
|
letter-spacing: 0.04em;
|
|
|
|
`;
|
|
|
|
|
|
|
|
export default observer(Labeled);
|