From 8eee8430f4d43f38ea8bdc56c8b50ef0e197e964 Mon Sep 17 00:00:00 2001 From: Bolaji Ajani Date: Sat, 25 Jan 2025 14:33:44 +0000 Subject: [PATCH] added doc pages using docsify --- README.md | 6 +- docs/.nojekyll | 0 docs/README.md | 109 ++++++++++++++++++++++++++++++++++ docs/_sidebar.md | 10 ++++ docs/{Colors.md => colors.md} | 0 docs/index.html | 23 +++++++ docs/{Text.md => text.md} | 0 docs/{View.md => view.md} | 0 8 files changed, 145 insertions(+), 3 deletions(-) create mode 100644 docs/.nojekyll create mode 100644 docs/README.md create mode 100644 docs/_sidebar.md rename docs/{Colors.md => colors.md} (100%) create mode 100644 docs/index.html rename docs/{Text.md => text.md} (100%) rename docs/{View.md => view.md} (100%) diff --git a/README.md b/README.md index 5d7f38d..6043e08 100644 --- a/README.md +++ b/README.md @@ -73,18 +73,18 @@ import { Image } from '@idimma/rn-widget'; | \`bw\` | \`number\` | Border width | | \`bc\` | \`string\` | Border color | -#### [Other View Props](./docs/View.md) +#### [Other View Props](./docs/view) ### Text Component | Prop | Type | Description | |-----------|---------------------|---------------------------------------------------| -| \`color\` | \`string\` | Text color [See list of colors](./docs/Colors.md) | +| \`color\` | \`string\` | Text color [See list of colors](./docs/colors) | | \`fs\` | \`number\` | Font size | | \`fw\` | \`'normal'\` \| \`'bold'\` \| \`number\` | Font weight | | \`align\` | \`'auto'\` \| \`'left'\` \| \`'right'\` \| \`'center'\` | Text alignment | -#### [Other Text Props](./docs/Text.md) +#### [Other Text Props](./docs/text) ### Image Component diff --git a/docs/.nojekyll b/docs/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..5d7f38d --- /dev/null +++ b/docs/README.md @@ -0,0 +1,109 @@ +# Idimma React Native Widgets + +react native components + +## Installation + +```sh +npm install @idimma/rn-widget +``` +[![NPM Total Downloads](https://img.shields.io/npm/dt/@idimma/rn-widget.svg?style=flat-square&label=Total+Downloads)](https://www.npmjs.com/package/@idimma/rn-widget) +[![npm Latest Package](https://img.shields.io/npm/v/@idimma/rn-widget/latest.svg)](https://www.npmjs.com/package/@idimma/rn-widget) +[![license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/idimma/rn-widgets/blob/main/LICENSE) +[![Follow on Twitter](https://img.shields.io/twitter/follow/idimmanuel.svg?label=follow+idimmanuel)](https://x.com/idimmanuel) +[![Github Stars](https://img.shields.io/github/stars/idimma/rn-widgets)](https://github.com/idimma/rn-widgets/stargazers) + +[//]: # ([![npm downloads](https://img.shields.io/npm/dm/@idimma/rn-widget.svg)](https://npm-stat.com/charts.html?package=@idimma/rn-widgets)) + +## Usage + +```js +import { View } from '@idimma/rn-widget'; + + + {/* Your content here */} + +``` + +```js +import { Text } from '@idimma/rn-widget'; + + + Hello, World! + +``` + +```js +import { Image } from '@idimma/rn-widget'; + +; +``` + +## Components and Props + +### View Component + +| Prop | Type | Description | +|------------|---------------------|----------------------------------------------------------| +| \`flex\` | \`boolean\` \| \`number\`| Flex grow factor | +| \`bg\` | \`string\` | Background color | +| \`p\` | \`number\` | Padding for all sides | +| \`m\` | \`number\` | Margin for all sides | +| \`radius\` | \`number\` | Border radius | +| \`bw\` | \`number\` | Border width | +| \`bc\` | \`string\` | Border color | + +#### [Other View Props](./docs/View.md) + +### Text Component + +| Prop | Type | Description | +|-----------|---------------------|---------------------------------------------------| +| \`color\` | \`string\` | Text color [See list of colors](./docs/Colors.md) | +| \`fs\` | \`number\` | Font size | +| \`fw\` | \`'normal'\` \| \`'bold'\` \| \`number\` | Font weight | +| \`align\` | \`'auto'\` \| \`'left'\` \| \`'right'\` \| \`'center'\` | Text alignment | + +#### [Other Text Props](./docs/Text.md) + + +### Image Component + +| Prop | Type | Description | +|----------------|---------------------|----------------------------------------------------------| +| \`source\` | \`ImageSourcePropType\`| Source of the image (usually requires a path or URL) | +| \`resizeMode\` | \`'cover'\` \| \`'contain'\` \| \`'stretch'\` | Resize mode for the image | +| \`style\` | \`ImageStyle\` | Custom styles for the image (e.g., width, height) | +#### [Other Image Props](./docs/Image.md) + +## Contributing + +See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow. + +## License + +MIT + +--- + +Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob) diff --git a/docs/_sidebar.md b/docs/_sidebar.md new file mode 100644 index 0000000..09ac3d3 --- /dev/null +++ b/docs/_sidebar.md @@ -0,0 +1,10 @@ +- Introduction/Installation + + - [Quick Start](/) + +- Components + + - [Colors](colors.md) + - [Image](image.md) + - [Text](text.md) + - [View](view.md) diff --git a/docs/Colors.md b/docs/colors.md similarity index 100% rename from docs/Colors.md rename to docs/colors.md diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..bf1f417 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,23 @@ + + + + + Idimma React Native Widgets + + + + + + +
+ + + + + diff --git a/docs/Text.md b/docs/text.md similarity index 100% rename from docs/Text.md rename to docs/text.md diff --git a/docs/View.md b/docs/view.md similarity index 100% rename from docs/View.md rename to docs/view.md