@kiwicom/orbit-components
Version:
Orbit-components is a React component library which provides developers with the easiest possible way of building Kiwi.com’s products.
37 lines (35 loc) • 1.08 kB
JavaScript
import * as React from "react";
import styled from "styled-components";
import Calendar from "../../icons/Calendar";
import defaultTokens from "../../defaultTokens";
import Text, { StyledText } from "../../Text";
const StyledTripDate = styled.div.withConfig({
displayName: "TripDate__StyledTripDate",
componentId: "sc-1t2zo5b-0"
})(["display:flex;align-items:center;margin-bottom:", ";padding-bottom:", ";background:", ";z-index:1;", "{font-weight:", ";margin-left:", ";height:", ";}"], ({
theme
}) => theme.orbit.spaceXSmall, ({
theme
}) => theme.orbit.spaceXXSmall, ({
theme
}) => theme.orbit.paletteWhite, StyledText, ({
theme
}) => theme.orbit.fontWeightMedium, ({
theme
}) => theme.orbit.spaceXSmall, ({
theme
}) => theme.orbit.heightIconSmall);
StyledTripDate.defaultProps = {
theme: defaultTokens
};
const TripDate = ({
children,
dataTest
}) => React.createElement(StyledTripDate, {
"data-test": dataTest
}, React.createElement(Calendar, {
size: "small"
}), React.createElement(Text, {
type: "attention"
}, children));
export default TripDate;