Skip to content

Commit

Permalink
IT-6115 datepicker has proper tile borders
Browse files Browse the repository at this point in the history
  • Loading branch information
pioziol123 committed Jan 28, 2025
1 parent 8100f19 commit 7da9fcf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/js/components/DatePickers/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
:interactive="isInteractive"
:additional-text="additionalText"
:color="color as TileColors"
:border-color="borderColor"
:state="state as TileStates"
:icon-right="tileIcon"
:is-icon-right-hidden-on-mobile="isIconHiddenOnMobile"
Expand Down Expand Up @@ -139,7 +140,7 @@
<script lang="ts">
import { defineComponent, PropType, Ref, ref, toRaw, watch } from 'vue';
import DsTile from '../../Tile';
import DsTile, { TILE_BORDER_COLORS } from '../../Tile';
import { IconItem, ICONS } from '../../Icons/Icon';
import DatePickerBox from '../DatePickerBox';
Expand Down Expand Up @@ -286,6 +287,22 @@ export default defineComponent({
};
},
computed: {
borderColor() {
return {
[DATE_PICKER_COLORS.NEUTRAL]: this.isInteractive
? TILE_BORDER_COLORS.PRIMARY
: TILE_BORDER_COLORS.NEUTRAL_WEAK,
[DATE_PICKER_COLORS.NEUTRAL_WEAK]: this.isInteractive
? TILE_BORDER_COLORS.PRIMARY
: TILE_BORDER_COLORS.NEUTRAL_WEAK,
[DATE_PICKER_COLORS.DANGER]: this.isInteractive
? TILE_BORDER_COLORS.DANGER
: TILE_BORDER_COLORS.DANGER_WEAK,
[DATE_PICKER_COLORS.WARNING]: this.isInteractive
? TILE_BORDER_COLORS.WARNING
: TILE_BORDER_COLORS.WARNING_WEAK,
}[this.color];
},
eyebrowText() {
if (!this.date) {
return '';
Expand Down

0 comments on commit 7da9fcf

Please # to comment.