Skip to content

Commit 6dd4811

Browse files
authored
Merge pull request #303 from mrzachnugent/@zach/cli-alert
feat(#269): add alert component to CLI
2 parents 64f07dc + f01e5d0 commit 6dd4811

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

apps/cli/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ If you do not add arguments, you will be prompted to select the `ui` components
1919
#### UI Components
2020

2121
- `accordion`
22+
- `alert`
2223
- `alert-dialog`
2324
- `aspect-ratio`
2425
- `avatar`

apps/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-reusables/cli",
3-
"version": "0.3.3",
3+
"version": "0.3.4",
44
"description": "Add react-native-reusables to your project.",
55
"publishConfig": {
66
"access": "public"

apps/cli/src/items/components.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,21 @@ export const COMPONENTS = [
1414
},
1515
],
1616
},
17+
{
18+
name: 'alert',
19+
dependencies: ['text'],
20+
icons: [],
21+
npmPackages: [],
22+
paths: [
23+
{
24+
from: './node_modules/@rnr/reusables/src/components/ui/alert.tsx',
25+
to: {
26+
folder: 'ui',
27+
file: 'alert.tsx',
28+
},
29+
},
30+
],
31+
},
1732
{
1833
name: 'alert-dialog',
1934
dependencies: ['button', 'text'],

packages/reusables/src/components/ui/alert.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@ import { useTheme } from '@react-navigation/native';
22
import { cva, type VariantProps } from 'class-variance-authority';
33
import type { LucideIcon } from 'lucide-react-native';
44
import * as React from 'react';
5-
import { Text, View, type ViewProps } from 'react-native';
5+
import { View, type ViewProps } from 'react-native';
66
import { cn } from '../../lib/utils';
7+
import { Text } from './text';
78

89
const alertVariants = cva(
910
'relative bg-background w-full rounded-lg border border-border p-4 shadow shadow-foreground/10',

0 commit comments

Comments
 (0)