@ramses-superapp/ramses-ui
Version:
Skinless UI primitives for Ramses Built Apps
37 lines (36 loc) • 912 B
JavaScript
;
import { forwardRef } from 'react';
import { Text, View } from 'react-native';
import { jsx as _jsx } from "react/jsx-runtime";
/**
* Skinless icon primitive.
* Renders the icon `name` as text. The skinning layer is expected to
* replace or augment this with the actual icon font/component for the
* chosen `source` family (feather, material, ionicons).
*/
const RsIcon = /*#__PURE__*/forwardRef(({
name,
size = 24,
style
}, ref) => {
return /*#__PURE__*/_jsx(View, {
ref: ref,
style: [{
width: size,
height: size,
alignItems: 'center',
justifyContent: 'center'
}, style],
accessibilityRole: "image",
accessibilityLabel: name,
children: /*#__PURE__*/_jsx(Text, {
style: {
fontSize: size
},
children: name
})
});
});
RsIcon.displayName = 'RsIcon';
export default RsIcon;
//# sourceMappingURL=RsIcon.js.map