v10

Orbit Migration Guide v10

Breaking changes

Tailwind requirement

StyledBox removed

import { StyledBox } from "@kiwicom/orbit-components";
const SomeWrapper = styled.div`
height: 100%;
${StyledBox} {
padding: 10px;
}
`;
const SomeWrapper = styled.div`
height: 100%;
.orbit-box {
padding: 10px;
}
`;

Using the styled function

import styled from "styled-components";
import { Box } from "@kiwicom/orbit-components";
const CustomBox = styled(Box)`
${({theme})} => css`
line-height: ${theme.orbit.lineHeightNormal};
padding: ${theme.orbit.spaceSmall};
`};
`;
import { Box } from "@kiwicom/orbit-components";
const CustomBox = props => <Box className="leading-normal" padding="small" {...props} />;

Align prop in Text

Icon prop in Card

<CardSection
icon={<CarrierLogo carriers={[{ code: "G9", name: "Air Arabia" }]} size="large" />}
title={
<Stack direction="row" spacing="XXSmall" align="center">
<Text weight="bold">Cairo CAI</Text>
<FlightDirect size="small" />
<Text weight="bold">Dubai SHJ</Text>
</Stack>
}
/>
<CardSection
title={
<Stack direction="row" spacing="XSmall" align="center">
<Box>
<CarrierLogo carriers={[{ code: "G9", name: "Air Arabia" }]} size="large" />
</Box>
<Stack direction="row" spacing="XXSmall" align="center">
<Text weight="bold">Cairo CAI</Text>
<FlightDirect size="small" />
<Text weight="bold">Dubai SHJ</Text>
</Stack>
</Stack>
}
/>