@brightlayer-ui/react-native-auth-workflow
Version:
Re-usable workflow components for Authentication and Registration within Eaton applications.
25 lines (24 loc) • 1.01 kB
JavaScript
import React from 'react';
import { View, StyleSheet } from 'react-native';
import { Text } from 'react-native-paper';
import { Icon } from '@brightlayer-ui/react-native-components';
import { useExtendedTheme } from '@brightlayer-ui/react-native-themes';
const makeStyles = () => StyleSheet.create({
label: {
marginLeft: 8,
},
});
/**
* Component to update password requirements.
*
* @param {PasswordRequirementsCheckProps} props - props of PasswordRequirementsCheck component
*
* @category Component
*/
export const PasswordRequirementsCheck = ({ isChecked, label }) => {
const theme = useExtendedTheme();
const defaultStyle = makeStyles();
return (React.createElement(View, { style: { flexDirection: 'row', alignItems: 'center', marginTop: 4 } },
React.createElement(Icon, { source: { name: 'check' }, color: isChecked ? theme.colors.primary : theme.colors.disabled }),
React.createElement(Text, { variant: "bodySmall", style: defaultStyle.label }, label)));
};