Skip to content

Commit

Permalink
add compat version
Browse files Browse the repository at this point in the history
  • Loading branch information
merodiro committed Apr 4, 2021
1 parent ae04741 commit 44510b1
Show file tree
Hide file tree
Showing 5 changed files with 472 additions and 4 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ setup({
})
```

or for better browser compatibility

_Note: the compat version only supports RTL and LTR_

```js
import twindLogical from 'twind-logical/compat'

setup({
plugins: {
...twindLogical,
},
})
```

## What are CSS Logical Properties and Values?

In short, CSS Logical Properties and Values extend CSS for easier development when working with non-LTR (left-to-right)
Expand Down
2 changes: 1 addition & 1 deletion example/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { setup } from 'twind/shim'
import { teal, cyan, lightBlue } from 'twind/colors'

// eslint-disable-next-line unicorn/import-index
import twindLogical from '../src/index'
import twindLogical from '../src/compat'

import App from './app'

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
"// Each entry is expanded into several bundles (module, script, types, require, node, and default)": "",
"exports": {
".": "./src/index.ts",
"./compat": "./src/compat.ts",
"./package.json": "./package.json"
},
"peerDependencies": {
Expand Down
Loading

0 comments on commit 44510b1

Please sign in to comment.