Skip to content

Commit

Permalink
fix(DateInput, DateInput3): use flex layout for rightElement (#6372)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya committed Sep 7, 2023
1 parent 5f40f68 commit 43fbb54
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
7 changes: 5 additions & 2 deletions packages/datetime/src/components/date-input/_dateinput.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

@import "../../common";

.#{$ns}-dateinput-popover {
padding: 0;
.#{$ns}-date-input {
.#{$ns}-input-action {
display: flex;
flex-direction: row;
}
}
2 changes: 1 addition & 1 deletion packages/datetime/src/components/date-input/dateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ export const DateInput: React.FC<DateInputProps> = React.memo(function _DateInpu
placeholder={placeholder}
rightElement={
<>
{maybeTimezonePicker}
{props.rightElement}
{maybeTimezonePicker}
</>
}
tagName={popoverProps.targetTagName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,8 @@ export const DateInput3: React.FC<DateInput3Props> = React.memo(function _DateIn
placeholder={placeholder}
rightElement={
<>
{maybeTimezonePicker}
{props.rightElement}
{maybeTimezonePicker}
</>
}
tagName={popoverProps.targetTagName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ export class DateInputExample extends React.PureComponent<ExampleProps, DateInpu
onChange={this.handleDateChange}
popoverProps={{ placement: "bottom" }}
rightElement={
showRightElement && (
<Icon icon="globe" intent="primary" style={{ padding: 7, marginLeft: -5 }} />
)
showRightElement && <Icon icon="globe" intent="primary" style={{ padding: "7px 5px" }} />
}
timePickerProps={
this.state.timePrecision === undefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ export class DateInput3Example extends React.PureComponent<ExampleProps, DateInp
onChange={this.handleDateChange}
popoverProps={{ placement: "bottom" }}
rightElement={
showRightElement && (
<Icon icon="globe" intent="primary" style={{ padding: 7, marginLeft: -5 }} />
)
showRightElement && <Icon icon="globe" intent="primary" style={{ padding: "7px 5px" }} />
}
timePickerProps={
this.state.timePrecision === undefined
Expand Down

1 comment on commit 43fbb54

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix(DateInput, DateInput3): use flex layout for rightElement (#6372)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.