position
position: "left" | "right" | "middle" = 'left'
location
location: "center" | "bottom" | "top" = 'top'
direction
direction: "horizontal" | "vertical" = 'horizontal'
buttonsContainerStyle
buttonsContainerStyle: any = {}
showAspect
showAspect: boolean = false
styles
styles: {
container: {
marginTop: string;
marginBottom: string;
zIndex: number;
};
buttonContainer: {
display: string;
alignItems: string;
padding: string;
borderRadius: string;
marginLeft: string;
marginRight: string;
cursor: string;
};
verticalButton: {
flexDirection: string;
};
buttonText: {
fontSize: string;
marginTop: string;
};
} = ...
ControlButtonsAltComponent provides configurable button controls with custom icons, colors, and positioning options.
Selector
app-control-buttons-alt-component
Standalone
true
Imports
CommonModule, FontAwesomeModule
Inputs
buttons
(AltButton[]): Array of button configurations with options for icon, color, state, and actions.position
('left' | 'right' | 'middle'): Horizontal alignment of buttons. Default is 'left'.location
('top' | 'bottom' | 'center'): Vertical alignment of buttons. Default is 'top'.direction
('horizontal' | 'vertical'): Layout direction for buttons. Default is 'horizontal'.buttonsContainerStyle
(PartialshowAspect
(boolean): Controls the visibility of the button container. Default is false.Methods
getAlignmentStyle()
: Returns alignment styles based onposition
,location
, anddirection
.getContainerStyle()
: Combines container styles, alignment styles, and visibility settings.getButtonStyle(button: AltButton)
: Applies style to each button based on its properties.getTextStyle(button: AltButton)
: Sets text styles for button labels.isCustomComponent(comp)
: Type guard to identify custom component objects.isFunctionComponent(comp)
: Type guard to identify function components.Example