import React from 'react'; import { Screen, View, Button, Text } from '@idealyst/components'; import { useUnistyles } from 'react-native-unistyles'; export const ButtonExamples = () => { const handlePress = (buttonType: string) => { console.log(`Button pressed: ${buttonType}`); }; const { theme } = useUnistyles() return ( Button Examples {/* Button Variants */} Variants {/* Show all intents in theme (including extended intents) */} All Intents { (Object.keys(theme.intents) as Array).map((intent) => ( )) } {/* Button Sizes */} Sizes {/* Button Intents */} Intents {/* Disabled States */} Disabled States {/* Buttons with Icons */} Buttons with Icons {/* Icon-only Buttons */} Icon-only Buttons {/* Gradient Overlay */} Gradient Overlay {/* Gradient with Different Intents */} Gradient Intents (Darken) {/* Gradient with Icons */} Gradient with Icons {/* Loading State */} Loading State {/* Loading with Different Intents */} Loading Intents {/* Interactive Loading Example */} Interactive Loading ); }; // Interactive loading button component const InteractiveLoadingButton = () => { const [loading, setLoading] = React.useState(false); const handlePress = async () => { setLoading(true); // Simulate async operation await new Promise(resolve => setTimeout(resolve, 2000)); setLoading(false); }; return ( ); };