@gechiui/components
Version:
UI components for GeChiUI.
46 lines (41 loc) • 1.15 kB
JavaScript
import { createElement } from "@gechiui/element";
/**
* External dependencies
*/
import { View } from 'react-native';
/**
* GeChiUI dependencies
*/
import { TextControl } from '@gechiui/components';
import { withPreferredColorScheme } from '@gechiui/compose';
import { useMemo } from '@gechiui/element';
/**
* Internal dependencies
*/
import styles from './actions.scss';
import BottomSeparatorCover from './bottom-separator-cover';
function PanelActions(_ref) {
let {
actions,
getStylesFromColorScheme
} = _ref;
const mappedActions = useMemo(() => {
return actions.map(_ref2 => {
let {
label,
onPress
} = _ref2;
return createElement(TextControl, {
label: label,
onPress: onPress,
labelStyle: styles.defaultLabelStyle,
key: label
});
});
}, [actions]);
return createElement(View, {
style: getStylesFromColorScheme(styles.panelActionsContainer, styles.panelActionsContainerDark)
}, mappedActions, createElement(BottomSeparatorCover, null));
}
export default withPreferredColorScheme(PanelActions);
//# sourceMappingURL=actions.native.js.map