diff --git a/example/storybook-nativewind/.storybook/preview.js b/example/storybook-nativewind/.storybook/preview.js
index c67d11297f..cff2a9ea58 100644
--- a/example/storybook-nativewind/.storybook/preview.js
+++ b/example/storybook-nativewind/.storybook/preview.js
@@ -62,7 +62,7 @@ export const parameters = {
'Disclosure',
['Actionsheet', 'Accordion'],
'Media And Icons',
- ['Avatar', 'Image'],
+ ['Avatar', 'Image', 'Icon'],
'Others',
['Fab'],
],
diff --git a/example/storybook-nativewind/src/components-example/nativewind/Icon/index.tsx b/example/storybook-nativewind/src/components-example/nativewind/Icon/index.tsx
index c85a661a4d..7fdb902658 100644
--- a/example/storybook-nativewind/src/components-example/nativewind/Icon/index.tsx
+++ b/example/storybook-nativewind/src/components-example/nativewind/Icon/index.tsx
@@ -1,15 +1,14 @@
import React from 'react';
import { createIcon } from '@gluestack-ui/icon';
import { Path, Svg } from 'react-native-svg';
-import { tva } from '@gluestack-ui/nativewind-utils';
-import { cssInterop } from 'nativewind';
+import { tva, cssInterop } from '@gluestack-ui/nativewind-utils';
export const UIIcon = createIcon({
Root: Svg,
});
const iconStyle = tva({
- base: 'color-background-800',
+ base: 'color-background-800 fill-none',
variants: {
size: {
'2xs': 'h-3 w-3',
@@ -26,7 +25,17 @@ const iconStyle = tva({
});
export const Icon = React.forwardRef(
- ({ fill = 'none', size, className, ...props }: any, ref) => {
+ ({ fill = 'none', size, className, as: AsComp, ...props }: any, ref) => {
+ if (AsComp) {
+ return (
+
+ );
+ }
return (
[0], 'Root'>;
+
const createIconUI = ({ ...props }: ParameterTypes) => {
const UIIcon = createIcon({ Root: Svg, ...props });
@@ -240,7 +250,7 @@ const AddIcon = React.forwardRef(({ className, size, ...props }: any, ref) => {
AddIcon.displayName = 'AddIcon';
export { AddIcon };
-export const UIAlertCircleIcon = createIcon({
+const UIAlertCircleIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -283,6 +293,7 @@ const AlertCircleIcon = React.forwardRef(
);
AlertCircleIcon.displayName = 'AlertCircleIcon';
+export { AlertCircleIcon };
const UIArrowUpIcon = createIcon({
Root: Svg,
@@ -1440,7 +1451,7 @@ GripVerticalIcon.displayName = 'GripVerticalIcon';
export { GripVerticalIcon };
-export const UIHelpCircleIcon = createIcon({
+const UIHelpCircleIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -1483,8 +1494,9 @@ const HelpCircleIcon = React.forwardRef(
);
HelpCircleIcon.displayName = 'HelpCircleIcon';
+export { HelpCircleIcon };
-export const UIInfoIcon = createIcon({
+const UIInfoIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -1525,6 +1537,7 @@ const InfoIcon = React.forwardRef(({ className, size, ...props }: any, ref) => {
});
InfoIcon.displayName = 'InfoIcon';
+export { InfoIcon };
const UILinkIcon = createIcon({
Root: Svg,
@@ -1713,7 +1726,7 @@ MailIcon.displayName = 'MailIcon';
export { MailIcon };
-export const UIMenuIcon = createIcon({
+const UIMenuIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -1754,6 +1767,7 @@ const MenuIcon = React.forwardRef(({ className, size, ...props }: any, ref) => {
});
MenuIcon.displayName = 'MenuIcon';
+export { MenuIcon };
const UIMessageCircleIcon = createIcon({
Root: Svg,
@@ -1787,7 +1801,7 @@ MessageCircleIcon.displayName = 'MessageCircleIcon';
export { MessageCircleIcon };
-export const UIMoonIcon = createIcon({
+const UIMoonIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -1814,6 +1828,7 @@ const MoonIcon = React.forwardRef(({ className, size, ...props }: any, ref) => {
});
MoonIcon.displayName = 'MoonIcon';
+export { MoonIcon };
const UIPaperclipIcon = createIcon({
Root: Svg,
@@ -1916,7 +1931,7 @@ PlayIcon.displayName = 'PlayIcon';
export { PlayIcon };
-export const UIRemoveIcon = createIcon({
+const UIRemoveIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -1945,6 +1960,7 @@ const RemoveIcon = React.forwardRef(
);
RemoveIcon.displayName = 'RemoveIcon';
+export { RemoveIcon };
const UIRepeatIcon = createIcon({
Root: Svg,
@@ -2057,7 +2073,7 @@ Repeat1Icon.displayName = 'Repeat1Icon';
export { RepeatIcon, Repeat1Icon };
-export const UISearchIcon = createIcon({
+const UISearchIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -2093,6 +2109,7 @@ const SearchIcon = React.forwardRef(
);
SearchIcon.displayName = 'SearchIcon';
+export { SearchIcon };
const UISettingsIcon = createIcon({
Root: Svg,
@@ -2262,7 +2279,7 @@ StarIcon.displayName = 'StarIcon';
export { StarIcon };
-export const UISunIcon = createIcon({
+const UISunIcon = createIcon({
Root: Svg,
viewBox: '0 0 24 24',
path: (
@@ -2345,6 +2362,7 @@ const SunIcon = React.forwardRef(({ className, size, ...props }: any, ref) => {
});
SunIcon.displayName = 'SunIcon';
+export { SunIcon };
const UIThreeDotsIcon = createIcon({
Root: Svg,
diff --git a/example/storybook-nativewind/src/components/Icon/Icon.tsx b/example/storybook-nativewind/src/components/Icon/Icon.tsx
index 8209b2fb83..78c1e8a962 100644
--- a/example/storybook-nativewind/src/components/Icon/Icon.tsx
+++ b/example/storybook-nativewind/src/components/Icon/Icon.tsx
@@ -1,69 +1,75 @@
import React from 'react';
-// import {
-// Icon,
-// AddIcon,
-// AlertCircleIcon,
-// ArrowUpIcon,
-// ArrowDownIcon,
-// ArrowRightIcon,
-// ArrowLeftIcon,
-// AtSignIcon,
-// BellIcon,
-// CalendarDaysIcon,
-// CheckIcon,
-// CheckCircleIcon,
-// ChevronUpIcon,
-// ChevronDownIcon,
-// ChevronLeftIcon,
-// ChevronRightIcon,
-// ChevronsLeftIcon,
-// ChevronsRightIcon,
-// ChevronsUpDownIcon,
-// CircleIcon,
-// ClockIcon,
-// CloseIcon,
-// CloseCircleIcon,
-// CopyIcon,
-// DownloadIcon,
-// EditIcon,
-// EyeIcon,
-// EyeOffIcon,
-// FavouriteIcon,
-// GlobeIcon,
-// GripVerticalIcon,
-// HelpCircleIcon,
-// InfoIcon,
-// LinkIcon,
-// ExternalLinkIcon,
-// LoaderIcon,
-// LockIcon,
-// MailIcon,
-// MenuIcon,
-// MessageCircleIcon,
-// MoonIcon,
-// PaperclipIcon,
-// PhoneIcon,
-// PlayIcon,
-// RemoveIcon,
-// RepeatIcon,
-// Repeat1Icon,
-// SearchIcon,
-// SettingsIcon,
-// ShareIcon,
-// SlashIcon,
-// StarIcon,
-// SunIcon,
-// ThreeDotsIcon,
-// TrashIcon,
-// UnlockIcon,
-// createIcon,
-// } from '@/components/ui/Icon';
+import {
+ Icon,
+ AddIcon,
+ AlertCircleIcon,
+ ArrowUpIcon,
+ ArrowDownIcon,
+ ArrowRightIcon,
+ ArrowLeftIcon,
+ AtSignIcon,
+ BellIcon,
+ CalendarDaysIcon,
+ CheckIcon,
+ CheckCircleIcon,
+ ChevronUpIcon,
+ ChevronDownIcon,
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ ChevronsLeftIcon,
+ ChevronsRightIcon,
+ ChevronsUpDownIcon,
+ CircleIcon,
+ ClockIcon,
+ CloseIcon,
+ CloseCircleIcon,
+ CopyIcon,
+ DownloadIcon,
+ EditIcon,
+ EyeIcon,
+ EyeOffIcon,
+ FavouriteIcon,
+ GlobeIcon,
+ GripVerticalIcon,
+ HelpCircleIcon,
+ InfoIcon,
+ LinkIcon,
+ ExternalLinkIcon,
+ LoaderIcon,
+ LockIcon,
+ MailIcon,
+ MenuIcon,
+ MessageCircleIcon,
+ MoonIcon,
+ PaperclipIcon,
+ PhoneIcon,
+ PlayIcon,
+ RemoveIcon,
+ RepeatIcon,
+ Repeat1Icon,
+ SearchIcon,
+ SettingsIcon,
+ ShareIcon,
+ SlashIcon,
+ StarIcon,
+ SunIcon,
+ ThreeDotsIcon,
+ TrashIcon,
+ UnlockIcon,
+ createIcon,
+} from '@/components/ui/Icon';
+import { HStack } from '@/components/ui/HStack';
+import { VStack } from '@/components/ui/VStack';
-// import { ChromeIcon, InstagramIcon, FacebookIcon } from 'lucide-react-native';
-import { AddIcon } from '@/components/ui/Icon';
+import {
+ ChromeIcon,
+ InstagramIcon,
+ FacebookIcon,
+ Camera,
+} from 'lucide-react-native';
const IconBasic = ({ size, ...props }: any) => {
- return ;
- // return ;
+ // return ;
+ return ;
};
IconBasic.description =
@@ -71,65 +77,68 @@ IconBasic.description =
export default IconBasic;
-// export {
-// AddIcon,
-// CheckIcon,
-// CloseIcon,
-// InfoIcon,
-// ArrowUpIcon,
-// ChevronDownIcon,
-// ChevronUpIcon,
-// ChevronLeftIcon,
-// ChevronRightIcon,
-// ChevronsLeftIcon,
-// ChevronsRightIcon,
-// AtSignIcon,
-// CheckCircleIcon,
-// AlertCircleIcon,
-// ChevronsUpDownIcon,
-// PaperclipIcon,
-// BellIcon,
-// MenuIcon,
-// ArrowRightIcon,
-// ArrowLeftIcon,
-// ArrowDownIcon,
-// CalendarDaysIcon,
-// MessageCircleIcon,
-// CopyIcon,
-// TrashIcon,
-// DownloadIcon,
-// GripVerticalIcon,
-// EditIcon,
-// MailIcon,
-// LinkIcon,
-// ExternalLinkIcon,
-// LockIcon,
-// RemoveIcon,
-// MoonIcon,
-// SlashIcon,
-// PhoneIcon,
-// HelpCircleIcon,
-// RepeatIcon,
-// Repeat1Icon,
-// SearchIcon,
-// SettingsIcon,
-// LoaderIcon,
-// StarIcon,
-// SunIcon,
-// ClockIcon,
-// UnlockIcon,
-// EyeIcon,
-// EyeOffIcon,
-// CloseCircleIcon,
-// ShareIcon,
-// CircleIcon,
-// FavouriteIcon,
-// GlobeIcon,
-// ThreeDotsIcon,
-// Icon,
-// ChromeIcon,
-// InstagramIcon,
-// FacebookIcon,
-// PlayIcon,
-// createIcon,
-// };
+export {
+ AddIcon,
+ CheckIcon,
+ CloseIcon,
+ InfoIcon,
+ ArrowUpIcon,
+ ChevronDownIcon,
+ ChevronUpIcon,
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ ChevronsLeftIcon,
+ ChevronsRightIcon,
+ AtSignIcon,
+ CheckCircleIcon,
+ AlertCircleIcon,
+ ChevronsUpDownIcon,
+ PaperclipIcon,
+ BellIcon,
+ MenuIcon,
+ ArrowRightIcon,
+ ArrowLeftIcon,
+ ArrowDownIcon,
+ CalendarDaysIcon,
+ MessageCircleIcon,
+ CopyIcon,
+ TrashIcon,
+ DownloadIcon,
+ GripVerticalIcon,
+ EditIcon,
+ MailIcon,
+ LinkIcon,
+ ExternalLinkIcon,
+ LockIcon,
+ RemoveIcon,
+ MoonIcon,
+ SlashIcon,
+ PhoneIcon,
+ HelpCircleIcon,
+ RepeatIcon,
+ Repeat1Icon,
+ SearchIcon,
+ SettingsIcon,
+ LoaderIcon,
+ StarIcon,
+ SunIcon,
+ ClockIcon,
+ UnlockIcon,
+ EyeIcon,
+ EyeOffIcon,
+ CloseCircleIcon,
+ ShareIcon,
+ CircleIcon,
+ FavouriteIcon,
+ GlobeIcon,
+ ThreeDotsIcon,
+ PlayIcon,
+ Icon,
+ VStack,
+ HStack,
+ ChromeIcon,
+ InstagramIcon,
+ FacebookIcon,
+ createIcon,
+ Camera,
+};
diff --git a/example/storybook-nativewind/src/components/Icon/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Icon/index.nw.stories.mdx
new file mode 100644
index 0000000000..6731ef0bb8
--- /dev/null
+++ b/example/storybook-nativewind/src/components/Icon/index.nw.stories.mdx
@@ -0,0 +1,230 @@
+---
+title: gluestack-ui Icon Component | Installation, Usage, and API
+
+description: Icons are often used to enhance the usability and accessibility of digital products by providing users with clear and intuitive visual cues. It serves as an intuitive and easily recognizable way to communicate with users.
+
+pageTitle: Icon
+
+pageDescription: Icons are often used to enhance the usability and accessibility of digital products by providing users with clear and intuitive visual cues. It serves as an intuitive and easily recognizable way to communicate with users.
+
+showHeader: true
+---
+
+import { Meta } from '@storybook/addon-docs';
+
+
+
+import {
+ AddIcon,
+ CheckIcon,
+ CloseIcon,
+ InfoIcon,
+ ArrowUpIcon,
+ ChevronDownIcon,
+ ChevronUpIcon,
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ ChevronsLeftIcon,
+ ChevronsRightIcon,
+ AtSignIcon,
+ CheckCircleIcon,
+ AlertCircleIcon,
+ ChevronsUpDownIcon,
+ PaperclipIcon,
+ BellIcon,
+ MenuIcon,
+ ArrowRightIcon,
+ ArrowLeftIcon,
+ ArrowDownIcon,
+ CalendarDaysIcon,
+ MessageCircleIcon,
+ CopyIcon,
+ TrashIcon,
+ DownloadIcon,
+ GripVerticalIcon,
+ EditIcon,
+ MailIcon,
+ LinkIcon,
+ ExternalLinkIcon,
+ LockIcon,
+ RemoveIcon,
+ MoonIcon,
+ SlashIcon,
+ PhoneIcon,
+ HelpCircleIcon,
+ RepeatIcon,
+ Repeat1Icon,
+ SearchIcon,
+ SettingsIcon,
+ LoaderIcon,
+ StarIcon,
+ SunIcon,
+ ClockIcon,
+ UnlockIcon,
+ EyeIcon,
+ EyeOffIcon,
+ CloseCircleIcon,
+ ShareIcon,
+ CircleIcon,
+ FavouriteIcon,
+ GlobeIcon,
+ ThreeDotsIcon,
+ PlayIcon,
+ Icon,
+ VStack,
+ HStack,
+ ChromeIcon,
+ InstagramIcon,
+ FacebookIcon,
+ createIcon,
+ Camera,
+} from './Icon';
+
+import { Path, Rect } from 'react-native-svg';
+
+import { transformedCode } from '../../utils';
+import {
+ AppProvider,
+ CodePreview,
+ Table,
+ TableContainer,
+ InlineCode,
+} from '@gluestack/design-system';
+
+import Wrapper from '../../components-example/nativewind/Wrapper';
+
+This is an illustration of **Icon** component.
+
+<>
+
+ `,
+ transformCode: (code) => {
+ return transformedCode(code);
+ },
+ scope: {
+ Wrapper,
+ Icon,
+ CalendarDaysIcon,
+ },
+ argsType: {
+ size: {
+ control: 'select',
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
+ default: 'md',
+ },
+ },
+ }}
+ />
+>
+
+
+
+## Installation
+
+### Step 1: Install the following dependencies:
+
+```bash
+
+npm i @gluestack-ui/icon
+
+```
+
+### Step 2: Copy and paste the following code into your project.
+
+
+ ```jsx %%-- File: components-example/nativewind/Icon/index.tsx --%% ```
+
+
+### Step 3: Update the import paths to match your project setup.
+
+## API Reference
+
+To use this component in your project, include the following import statement in your file.
+
+```jsx
+import { Icon } from '@/components/ui/Icon';
+```
+
+```jsx
+export default () => ;
+```
+
+### Component Props
+
+This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.
+
+#### Icon
+
+Pre built icons provided by gluestack-ui inherits all the properties of React Native SVG's [svg](https://github.com/software-mansion/react-native-svg/tree/main/Example) component.
+
+The Icon components inherits all the properties that third party library provides and can be directly applied as props.
+
+### Features
+
+- support of props on any svg icon
+
+### Accessibility
+
+We have outlined the various features that ensure the Icon component is accessible to all users, including those with disabilities. These features help ensure that your application is inclusive and meets accessibility standards.
+
+Role: img is passed
+
+### Props
+
+Icon component is created using AsForwarder component from @gluestack-style/react. It extends all the props supported by [gluestack-ui AsForwarder](https://gluestack.io/style/docs/api/as-forwarder), [utility props](/ui/docs/styling/utility-and-sx-props) and the props mentioned below.
+
+#### Image
+
+<>
+
+
+
+
+
+ Name
+
+
+ Value
+
+
+ Default
+
+
+
+
+
+
+
+ size
+
+
+
+ {'2xs | xs | sm | md | lg | xl'}
+
+
+ md
+
+
+
+
+
+>
+
+## Spec Doc
+
+Explore the comprehensive details of the Icon in this document, including its implementation details, checklist, and potential future additions. Dive into the thought process behind the component and gain insights into its development journey.
+
+
diff --git a/example/storybook-nativewind/src/components/Icon/index.stories.mdx b/example/storybook-nativewind/src/components/Icon/index.stories.mdx
deleted file mode 100644
index 78b02bcfcc..0000000000
--- a/example/storybook-nativewind/src/components/Icon/index.stories.mdx
+++ /dev/null
@@ -1,448 +0,0 @@
----
-title: Icon | gluestack-ui | Installation, Usage, and API
-description: Icons are often used to enhance the usability and accessibility of digital products by providing users with clear and intuitive visual cues. It serves as an intuitive and easily recognizable way to communicate with users.
-pageTitle: Icon
-pageDescription: Icons are often used to enhance the usability and accessibility of digital products by providing users with clear and intuitive visual cues. It serves as an intuitive and easily recognizable way to communicate with users.
-showHeader: true
----
-
-import { Meta } from '@storybook/addon-docs';
-
-
-
-import { VStack, Icon, HStack } from './Icon';
-
-import { AddIcon, CheckIcon, CloseIcon, InfoIcon } from './Icon';
-import { ArrowUpIcon, ChevronDownIcon, ChevronUpIcon } from './Icon';
-import { ChevronLeftIcon, ChevronRightIcon } from './Icon';
-import { ChevronsLeftIcon, ChevronsRightIcon, AtSignIcon } from './Icon';
-import { CheckCircleIcon, AlertCircleIcon } from './Icon';
-import { ChevronsUpDownIcon, PaperclipIcon, BellIcon } from './Icon';
-import { MenuIcon, ArrowRightIcon, ArrowLeftIcon } from './Icon';
-import { ArrowDownIcon, CalendarDaysIcon, MessageCircleIcon } from './Icon';
-import { CopyIcon, TrashIcon, DownloadIcon } from './Icon';
-import { GripVerticalIcon, EditIcon, MailIcon, LinkIcon } from './Icon';
-import { ExternalLinkIcon, LockIcon, RemoveIcon, MoonIcon } from './Icon';
-import { SlashIcon, PhoneIcon, HelpCircleIcon, RepeatIcon } from './Icon';
-import { Repeat1Icon, SearchIcon, SettingsIcon, LoaderIcon } from './Icon';
-import { StarIcon, SunIcon, ClockIcon, UnlockIcon } from './Icon';
-import { EyeIcon, EyeOffIcon, CloseCircleIcon, ShareIcon } from './Icon';
-import { CircleIcon, FavouriteIcon, GlobeIcon, PlayIcon } from './Icon';
-import { ThreeDotsIcon, createIcon } from './Icon';
-
-import { Path, Rect } from 'react-native-svg';
-
-import {
- Camera,
- ChromeIcon,
- InstagramIcon,
- FacebookIcon,
-} from 'lucide-react-native';
-
-import { transformedCode } from '../../utils';
-import {
- AppProvider,
- CodePreview,
- Table,
- TableContainer,
- InlineCode,
-} from '@gluestack/design-system';
-
-import Wrapper from '../../components-example/themed/Wrapper';
-
-This is an illustration of **Icon** component.
-
-<>
-
- `,
- transformCode: (code) => {
- return transformedCode(code);
- },
- scope: {
- Wrapper,
- Icon,
- CalendarDaysIcon,
- },
- argsType: {
- size: {
- control: 'select',
- options: ['xs', 'sm', 'md', 'lg', 'xl'],
- default: 'md',
- },
- },
- }}
- />
->
-
-
-
-## API Reference
-
-### Import
-
-To use this component in your project, include the following import statement in your file.
-
-```jsx
-import { Icon } from '@gluestack-ui/themed';
-```
-
-### Anatomy
-
-The structure provided below can help you identify and understand a Icon component's various parts.
-
-```jsx
-export default () => ;
-```
-
-### Component Props
-
-This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.
-
-#### Icon
-
-Pre built icons provided by gluestack-ui inherits all the properties of React Native SVG's [svg](https://github.com/software-mansion/react-native-svg/tree/main/Example) component.
-
-The Icon components inherits all the properties that third party library provides and can be directly applied as props.
-
-### Features
-
-- support of props on any svg icon
-
-### Accessibility
-
-We have outlined the various features that ensure the Icon component is accessible to all users, including those with disabilities. These features help ensure that your application is inclusive and meets accessibility standards.
-
-Role: img is passed
-
-## Themed
-
-The themed version of the component is a pre-styled version of the component, which allows you to quickly integrate the component into your project. The component's design and functionality are fully defined, allowing you to focus on the more important aspects of your project. To know more about Themed Library please visit this [link](https://gluestack.io/ui/docs/core-concepts/themed-library).
-
-### Props
-
-Icon component is created using AsForwarder component from @gluestack-style/react. It extends all the props supported by [gluestack-ui AsForwarder](https://gluestack.io/style/docs/api/as-forwarder), [utility props](/ui/docs/styling/utility-and-sx-props) and the props mentioned below.
-
-#### Image
-
-<>
-
-
-
-
-
- Name
-
-
- Value
-
-
- Default
-
-
-
-
-
-
-
- size
-
-
-
- {'2xs | xs | sm | md | lg | xl'}
-
-
- md
-
-
-
-
-
->
-
-### Examples
-
-The Examples section provides visual representations of the different variants of the component, allowing you to quickly and easily determine which one best fits your needs. Simply copy the code and integrate it into your project.
-
-#### All gluestack icons
-
-Below is a list of all of the icons in the library.
-
-<>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-`,
- transformCode: (code) => {
- return transformedCode(code);
- },
- scope: {
- Wrapper,
- HStack,
- AddIcon,
- CheckIcon,
- CloseIcon,
- InfoIcon,
- ArrowUpIcon,
- ChevronDownIcon,
- ChevronUpIcon,
- ChevronLeftIcon,
- ChevronRightIcon,
- ChevronsLeftIcon,
- ChevronsRightIcon,
- AtSignIcon,
- CheckCircleIcon,
- AlertCircleIcon,
- ChevronsUpDownIcon,
- PaperclipIcon,
- BellIcon,
- MenuIcon,
- ArrowRightIcon,
- ArrowLeftIcon,
- ArrowDownIcon,
- CalendarDaysIcon,
- MessageCircleIcon,
- CopyIcon,
- TrashIcon,
- DownloadIcon,
- GripVerticalIcon,
- EditIcon,
- MailIcon,
- LinkIcon,
- ExternalLinkIcon,
- LockIcon,
- RemoveIcon,
- MoonIcon,
- SlashIcon,
- PhoneIcon,
- HelpCircleIcon,
- RepeatIcon,
- Repeat1Icon,
- SearchIcon,
- SettingsIcon,
- LoaderIcon,
- StarIcon,
- SunIcon,
- ClockIcon,
- UnlockIcon,
- EyeIcon,
- EyeOffIcon,
- CloseCircleIcon,
- ShareIcon,
- CircleIcon,
- FavouriteIcon,
- GlobeIcon,
- ThreeDotsIcon,
- Icon,
- PlayIcon
- },
- argsType: {},
- }}
-/>
-
->
-
-#### Lucide Icons (Recommended)
-
-[Lucide](https://lucide.dev/docs/lucide-react-native) is an open source icon library for displaying icons for react-native. `gluestack-ui` provides an easy integration with lucide icons.
-
-<>
-
-
-
-
-
-
-`,
- transformCode: (code) => {
- return transformedCode(code);
- },
- scope: {
- Wrapper,
- VStack,
- ChromeIcon,
- InstagramIcon,
- FacebookIcon,
- Icon,
- Camera,
- },
- argsType: {},
- }}
- />
->
-
-#### SVG & Custom Icons
-
-We can directly create Icon using `createIcon` function exported from `@gluestack-ui/themed` and use it by passing it in `as` prop in `Icon` component.
-CreateIcon function takes viewBox, d, path etc as parameters. We can use svgs from other icon libraries like fluent, react-icons etc.
-
-##### Notes to remember while using createIcon function
-
-- Pass svg props such as `viewBox` in `createIcon` directly.
-- Copy the svg code without the SVG tag directly into the function argument `Path` or `D` or whichever prop justifies your svg.
-- Replace HTML SVG tags (e.g., ``, `` etc) with the corresponding React Native SVG components (e.g., ``, `` etc).
-- For any color property (i.e. fill, stroke etc), if you want to override that color, pass "currentColor" instead of a colorCode.
-
-Before :
-` `
-
-After :
-` `
-
-<>
-
- {/* Rect, Path is imported from 'react-native-svg' */}
-
-
-
-
-
- >
- ),
- });
- function App () {
- return ;
- }
- `,
- transformCode: (code) => {
- return transformedCode(code, 'function', 'App');
- },
- scope: {
- Wrapper,
- createIcon,
- Icon,
- Path,
- Rect,
- },
- argsType: {},
- }}
- />
->
-
-> gluestack-ui provides a set of pre created icons that can be used directly in our app and can also integrate third party icons using [AsForwarder](/style/docs/api/as-forwarder) from [gluestack-style](/style)
-
-## Unstyled
-
-All the components in `gluestack-ui` are unstyled by default. To customize your UI using the extendedTheme, please refer to this [link](https://gluestack.io/ui/docs/theme-configuration/customizing-theme). The import names of components serve as keys to customize each component.
-
-
-
-## Spec Doc
-
-Explore the comprehensive details of the Icon in this document, including its implementation details, checklist, and potential future additions. Dive into the thought process behind the component and gain insights into its development journey.
-
-
diff --git a/example/storybook-nativewind/src/components/Icon/index.themed.stories.mdx b/example/storybook-nativewind/src/components/Icon/index.themed.stories.mdx
new file mode 100644
index 0000000000..f1592394af
--- /dev/null
+++ b/example/storybook-nativewind/src/components/Icon/index.themed.stories.mdx
@@ -0,0 +1,230 @@
+---
+title: gluestack-ui Icon Component | Installation, Usage, and API
+
+description: Icons are often used to enhance the usability and accessibility of digital products by providing users with clear and intuitive visual cues. It serves as an intuitive and easily recognizable way to communicate with users.
+
+pageTitle: Icon
+
+pageDescription: Icons are often used to enhance the usability and accessibility of digital products by providing users with clear and intuitive visual cues. It serves as an intuitive and easily recognizable way to communicate with users.
+
+showHeader: true
+---
+
+import { Meta } from '@storybook/addon-docs';
+
+
+
+import {
+ AddIcon,
+ CheckIcon,
+ CloseIcon,
+ InfoIcon,
+ ArrowUpIcon,
+ ChevronDownIcon,
+ ChevronUpIcon,
+ ChevronLeftIcon,
+ ChevronRightIcon,
+ ChevronsLeftIcon,
+ ChevronsRightIcon,
+ AtSignIcon,
+ CheckCircleIcon,
+ AlertCircleIcon,
+ ChevronsUpDownIcon,
+ PaperclipIcon,
+ BellIcon,
+ MenuIcon,
+ ArrowRightIcon,
+ ArrowLeftIcon,
+ ArrowDownIcon,
+ CalendarDaysIcon,
+ MessageCircleIcon,
+ CopyIcon,
+ TrashIcon,
+ DownloadIcon,
+ GripVerticalIcon,
+ EditIcon,
+ MailIcon,
+ LinkIcon,
+ ExternalLinkIcon,
+ LockIcon,
+ RemoveIcon,
+ MoonIcon,
+ SlashIcon,
+ PhoneIcon,
+ HelpCircleIcon,
+ RepeatIcon,
+ Repeat1Icon,
+ SearchIcon,
+ SettingsIcon,
+ LoaderIcon,
+ StarIcon,
+ SunIcon,
+ ClockIcon,
+ UnlockIcon,
+ EyeIcon,
+ EyeOffIcon,
+ CloseCircleIcon,
+ ShareIcon,
+ CircleIcon,
+ FavouriteIcon,
+ GlobeIcon,
+ ThreeDotsIcon,
+ PlayIcon,
+ Icon,
+ VStack,
+ HStack,
+ ChromeIcon,
+ InstagramIcon,
+ FacebookIcon,
+ createIcon,
+ Camera,
+} from './Icon';
+
+import { Path, Rect } from 'react-native-svg';
+
+import { transformedCode } from '../../utils';
+import {
+ AppProvider,
+ CodePreview,
+ Table,
+ TableContainer,
+ InlineCode,
+} from '@gluestack/design-system';
+
+import Wrapper from '../../components-example/themed/Wrapper';
+
+This is an illustration of **Icon** component.
+
+<>
+
+ `,
+ transformCode: (code) => {
+ return transformedCode(code);
+ },
+ scope: {
+ Wrapper,
+ Icon,
+ CalendarDaysIcon,
+ },
+ argsType: {
+ size: {
+ control: 'select',
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
+ default: 'md',
+ },
+ },
+ }}
+ />
+>
+
+
+
+## Installation
+
+### Step 1: Install the following dependencies:
+
+```bash
+
+npm i @gluestack-ui/icon
+
+```
+
+### Step 2: Copy and paste the following code into your project.
+
+
+ ```jsx %%-- File: components-example/themed/Icon/index.tsx --%% ```
+
+
+### Step 3: Update the import paths to match your project setup.
+
+## API Reference
+
+To use this component in your project, include the following import statement in your file.
+
+```jsx
+import { Icon } from '@/components/ui/Icon';
+```
+
+```jsx
+export default () => ;
+```
+
+### Component Props
+
+This section provides a comprehensive reference list for the component props, detailing descriptions, properties, types, and default behavior for easy project integration.
+
+#### Icon
+
+Pre built icons provided by gluestack-ui inherits all the properties of React Native SVG's [svg](https://github.com/software-mansion/react-native-svg/tree/main/Example) component.
+
+The Icon components inherits all the properties that third party library provides and can be directly applied as props.
+
+### Features
+
+- support of props on any svg icon
+
+### Accessibility
+
+We have outlined the various features that ensure the Icon component is accessible to all users, including those with disabilities. These features help ensure that your application is inclusive and meets accessibility standards.
+
+Role: img is passed
+
+### Props
+
+Icon component is created using AsForwarder component from @gluestack-style/react. It extends all the props supported by [gluestack-ui AsForwarder](https://gluestack.io/style/docs/api/as-forwarder), [utility props](/ui/docs/styling/utility-and-sx-props) and the props mentioned below.
+
+#### Image
+
+<>
+
+
+
+
+
+ Name
+
+
+ Value
+
+
+ Default
+
+
+
+
+
+
+
+ size
+
+
+
+ {'2xs | xs | sm | md | lg | xl'}
+
+
+ md
+
+
+
+
+
+>
+
+## Spec Doc
+
+Explore the comprehensive details of the Icon in this document, including its implementation details, checklist, and potential future additions. Dive into the thought process behind the component and gain insights into its development journey.
+
+