Alignment of icon button is to right (#372)

This commit is contained in:
satbir121 2020-08-24 11:12:19 +05:30 committed by GitHub
parent 3deb9ace43
commit bccef563c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,12 +2,16 @@ import React from "react";
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
import { TriggerPropertiesMap } from "utils/WidgetFactory";
import { WidgetType, WidgetTypes } from "constants/WidgetConstants";
import styled from "styled-components";
import IconComponent, {
IconType,
} from "components/designSystems/appsmith/IconComponent";
import { EventType, ExecutionResult } from "constants/ActionConstants";
const IconWrapper = styled.div`
display: flex;
justify-content: flex-end;
`;
class IconWidget extends BaseWidget<IconWidgetProps, WidgetState> {
static getTriggerPropertyMap(): TriggerPropertiesMap {
return {
@ -32,13 +36,15 @@ class IconWidget extends BaseWidget<IconWidgetProps, WidgetState> {
getPageView() {
return (
<IconComponent
iconName={this.props.iconName}
disabled={this.props.disabled}
iconSize={this.props.iconSize}
color={this.props.color}
onClick={this.onClick}
/>
<IconWrapper>
<IconComponent
iconName={this.props.iconName}
disabled={this.props.disabled}
iconSize={this.props.iconSize}
color={this.props.color}
onClick={this.onClick}
/>
</IconWrapper>
);
}