Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
marklawlor committed Aug 10, 2023
1 parent 04acd05 commit ef00fd7
Show file tree
Hide file tree
Showing 38 changed files with 437 additions and 520 deletions.
14 changes: 4 additions & 10 deletions apps/website/docs/customization/colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,25 @@ You can customize your colors in the same manner as Tailwind CSS. Please refer t

Unlike the web, which uses a common color palette, native platforms have their own unique system colors which as access through [PlatformColor](https://reactnative.dev/docs/platformcolor)

NativeWind allows you to use access PlatformColor via the special `platformColor()` syntax in your theme.
NativeWind allows you to use access PlatformColor via the `platformColor()` utility.

```js
// tailwind.config.js

const { platformSelect } = require("nativewind");
const { platformSelect, platformColor } = require("nativewind/theme");

module.exports = {
theme: {
extend: {
colors: {
error: platformSelect({
// Now you can provide platform specific values
ios: "platformColor(systemRed)",
android: "platformColor(?android:colorError)",
ios: platformColor("systemRed"),
android: platformColor("?android:colorError"),
default: "red",
}),
},
},
},
};
```

:::note

There are no quotes between the brackets in `platformColor(systemRed)`

:::
41 changes: 0 additions & 41 deletions apps/website/docs/tailwind/flexbox/flex-basis.md

This file was deleted.

17 changes: 17 additions & 0 deletions apps/website/docs/tailwind/flexbox/flex-basis.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Compatibility from "../\_compatibility.mdx"
import Usage from "../\_usage.mdx"

# Flex Basis

## Usage

<Usage />

## Compatibility

<Compatibility
supported={[ "basis-{n}", "basis-[n]" ]}
none={[
"basis-auto",
]}
/>
113 changes: 0 additions & 113 deletions apps/website/docs/tailwind/flexbox/flex-direction.md

This file was deleted.

23 changes: 23 additions & 0 deletions apps/website/docs/tailwind/flexbox/flex-direction.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import Compatibility from "../\_compatibility.mdx"
import Usage from "../\_usage.mdx"

# Flex Direction

## Usage

<Usage />

:::tip
React Native has a different default flex direction to web. We highly recommend explicting setting the Flex Direction on your components.
:::

## Compatibility

<Compatibility
supported={[
"flex-row",
"flex-row-reverse",
"flex-col",
"flex-col-reverse",
]}
/>
67 changes: 0 additions & 67 deletions apps/website/docs/tailwind/flexbox/flex-grow.md

This file was deleted.

17 changes: 17 additions & 0 deletions apps/website/docs/tailwind/flexbox/flex-grow.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Compatibility from "../\_compatibility.mdx"
import Usage from "../\_usage.mdx"

# Flex Grow

## Usage

<Usage />

## Compatibility

<Compatibility
supported={[
"grow",
"grow-0",
]}
/>
66 changes: 0 additions & 66 deletions apps/website/docs/tailwind/flexbox/flex-wrap.md

This file was deleted.

Loading

0 comments on commit ef00fd7

Please sign in to comment.