Alignment of icon button is to right (#372)
This commit is contained in:
parent
3deb9ace43
commit
bccef563c4
|
|
@ -2,12 +2,16 @@ import React from "react";
|
||||||
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
|
import BaseWidget, { WidgetProps, WidgetState } from "./BaseWidget";
|
||||||
import { TriggerPropertiesMap } from "utils/WidgetFactory";
|
import { TriggerPropertiesMap } from "utils/WidgetFactory";
|
||||||
import { WidgetType, WidgetTypes } from "constants/WidgetConstants";
|
import { WidgetType, WidgetTypes } from "constants/WidgetConstants";
|
||||||
|
import styled from "styled-components";
|
||||||
import IconComponent, {
|
import IconComponent, {
|
||||||
IconType,
|
IconType,
|
||||||
} from "components/designSystems/appsmith/IconComponent";
|
} from "components/designSystems/appsmith/IconComponent";
|
||||||
import { EventType, ExecutionResult } from "constants/ActionConstants";
|
import { EventType, ExecutionResult } from "constants/ActionConstants";
|
||||||
|
|
||||||
|
const IconWrapper = styled.div`
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
`;
|
||||||
class IconWidget extends BaseWidget<IconWidgetProps, WidgetState> {
|
class IconWidget extends BaseWidget<IconWidgetProps, WidgetState> {
|
||||||
static getTriggerPropertyMap(): TriggerPropertiesMap {
|
static getTriggerPropertyMap(): TriggerPropertiesMap {
|
||||||
return {
|
return {
|
||||||
|
|
@ -32,6 +36,7 @@ class IconWidget extends BaseWidget<IconWidgetProps, WidgetState> {
|
||||||
|
|
||||||
getPageView() {
|
getPageView() {
|
||||||
return (
|
return (
|
||||||
|
<IconWrapper>
|
||||||
<IconComponent
|
<IconComponent
|
||||||
iconName={this.props.iconName}
|
iconName={this.props.iconName}
|
||||||
disabled={this.props.disabled}
|
disabled={this.props.disabled}
|
||||||
|
|
@ -39,6 +44,7 @@ class IconWidget extends BaseWidget<IconWidgetProps, WidgetState> {
|
||||||
color={this.props.color}
|
color={this.props.color}
|
||||||
onClick={this.onClick}
|
onClick={this.onClick}
|
||||||
/>
|
/>
|
||||||
|
</IconWrapper>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user