Right-to-left languages

Right to left languages

import { OrbitProvider, defaultTheme } from "@kiwicom/orbit-components";
<OrbitProvider useId={React.useId} theme={{ ...defaultTheme, rtl: true }}>
<App />
</OrbitProvider>;

Utilities

rtlSpacing

Usage

import { rtlSpacing } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
margin: ${rtlSpacing("10px 20px 30px 40px")};
`;

left

Usage

import { left } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
${left}: 0;
`;

right

Usage

import { right } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
${right}: 0;
`;

borderRadius

Usage

import { borderRadius } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
border-radius: ${borderRadius("0 3px 3px 0")};
`;

textAlign

Usage with left

import { textAlign } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
text-align: ${textAlign("left")};
`;

Usage with right

import { textAlign } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
text-align: ${textAlign("right")};
`;

translate3d

import { translate3d } from "@kiwicom/orbit-components/lib/utils/rtl";
const Component = styled.div`
transform: ${translate3d("400px, 0, 0")};
`;