@sudobility/building_blocks_rn 0.0.16 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/src/components/empty-state/EmptyState.d.ts +9 -0
- package/dist/src/components/empty-state/EmptyState.js +36 -0
- package/dist/src/components/empty-state/index.d.ts +2 -0
- package/dist/src/components/empty-state/index.js +1 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './src/components/footer';
|
|
|
3
3
|
export * from './src/components/layout';
|
|
4
4
|
export * from './src/components/settings';
|
|
5
5
|
export * from './src/components/pages';
|
|
6
|
+
export * from './src/components/empty-state';
|
|
6
7
|
export { SudobilityAppRN } from './src/app/SudobilityAppRN';
|
|
7
8
|
export type { SudobilityAppRNProps } from './src/app/SudobilityAppRN';
|
|
8
9
|
export { SafeSubscriptionContext, STUB_SUBSCRIPTION_VALUE, useSafeSubscription, } from './src/components/subscription/SafeSubscriptionContext';
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ export * from './src/components/footer';
|
|
|
4
4
|
export * from './src/components/layout';
|
|
5
5
|
export * from './src/components/settings';
|
|
6
6
|
export * from './src/components/pages';
|
|
7
|
+
export * from './src/components/empty-state';
|
|
7
8
|
// App wrapper without auth dependency
|
|
8
9
|
export { SudobilityAppRN } from './src/app/SudobilityAppRN';
|
|
9
10
|
// Subscription components without auth dependency
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface EmptyStateProps {
|
|
2
|
+
/** Descriptive message shown above the action button */
|
|
3
|
+
message: string;
|
|
4
|
+
/** Label for the primary action button */
|
|
5
|
+
buttonLabel: string;
|
|
6
|
+
/** Callback fired when the action button is pressed */
|
|
7
|
+
onPress: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function EmptyState({ message, buttonLabel, onPress }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { View, Text, Pressable } from 'react-native';
|
|
3
|
+
import { createThemedStyles } from '../../utils/styles';
|
|
4
|
+
export function EmptyState({ message, buttonLabel, onPress }) {
|
|
5
|
+
const styles = useStyles();
|
|
6
|
+
return (_jsxs(View, { style: styles.container, children: [_jsx(Text, { style: styles.message, children: message }), _jsx(Pressable, { style: styles.button, onPress: onPress, accessibilityRole: 'button', accessibilityLabel: buttonLabel, children: _jsx(Text, { style: styles.buttonText, children: buttonLabel }) })] }));
|
|
7
|
+
}
|
|
8
|
+
const useStyles = createThemedStyles(colors => ({
|
|
9
|
+
container: {
|
|
10
|
+
flexGrow: 1,
|
|
11
|
+
justifyContent: 'center',
|
|
12
|
+
alignItems: 'center',
|
|
13
|
+
paddingHorizontal: 32,
|
|
14
|
+
},
|
|
15
|
+
message: {
|
|
16
|
+
fontSize: 15,
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
lineHeight: 22,
|
|
19
|
+
color: colors.textSecondary,
|
|
20
|
+
marginBottom: 16,
|
|
21
|
+
},
|
|
22
|
+
button: {
|
|
23
|
+
backgroundColor: '#2563eb',
|
|
24
|
+
borderRadius: 6,
|
|
25
|
+
minHeight: 44,
|
|
26
|
+
paddingHorizontal: 24,
|
|
27
|
+
paddingVertical: 8,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
justifyContent: 'center',
|
|
30
|
+
},
|
|
31
|
+
buttonText: {
|
|
32
|
+
color: '#ffffff',
|
|
33
|
+
fontSize: 14,
|
|
34
|
+
fontWeight: '500',
|
|
35
|
+
},
|
|
36
|
+
}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmptyState } from './EmptyState';
|