layershifter / stylis-plugin-rtl

↔️ stylis RTL plugin based on CSSJanus

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

stylis-plugin-rtl

Stylis RTL plugin based on CSSJanus

Usage with styled-components v5+

import styled, { StyleSheetManager } from "styled-components";
import rtlPlugin from "stylis-plugin-rtl";

const Box = styled.div`
  padding-left: 10px;
`;

function MakeItRTL() {
  return (
    <StyleSheetManager stylisPlugins={[rtlPlugin]}>
      <Box>My padding will be on the right!</Box>
    </StyleSheetManager>
  );
}

This is a fork of stylis-rtl for use with styled-components v5+

About

↔️ stylis RTL plugin based on CSSJanus


Languages

Language:JavaScript 100.0%