Files
nativewind/apps/website/docs/tailwind/svg/stroke-width.mdx
2022-07-12 19:05:30 +10:00

30 lines
597 B
Plaintext

import Compatibility from "../_compatibility.mdx";
import RNSVG from "./_rn-svg.mdx";
# Stroke Width
## Usage
<RNSVG />
```tsx
import { styled } from "nativewind";
import { Svg, Rect } from "react-native-svg";
const StyledRect = styled(Rect, { classProps: ["fill", "stroke"] });
function MyStyledSvg({ stroke, ...props }) {
return (
<Svg height="100" width="100" {...props}>
<StyledRect x="0" y="0" width="100" height="100" stroke={stroke} />
</Svg>
);
}
<MyStyledSvg stroke="stroke-1" />;
```
## Compatibility
<Compatibility supported={["stroke-{n}", "stroke-[n]"]} />