From 93f74a4ff076e9e36759217e7f36881ca74f20a1 Mon Sep 17 00:00:00 2001 From: Matt Driscoll Date: Mon, 6 Dec 2021 11:43:18 -0800 Subject: [PATCH] refactor: Remove setting 'dir' attribute within components. #2079 --- src/components/calcite-avatar/calcite-avatar.tsx | 13 ++----------- src/components/calcite-chip/calcite-chip.tsx | 1 - .../calcite-color-picker-hex-input.tsx | 6 ++---- .../calcite-color-picker/calcite-color-picker.tsx | 2 -- .../calcite-date-picker-month-header.tsx | 14 ++++---------- .../calcite-date-picker-month.tsx | 10 +++------- .../calcite-date-picker/calcite-date-picker.tsx | 8 +------- .../calcite-dropdown-group.tsx | 4 +--- .../calcite-dropdown-item.tsx | 2 -- src/components/calcite-fab/calcite-fab.tsx | 7 ++----- .../calcite-input-date-picker.tsx | 9 +-------- src/components/calcite-input/calcite-input.tsx | 3 +-- src/components/calcite-link/calcite-link.tsx | 1 - .../calcite-pagination/calcite-pagination.tsx | 6 ++---- .../calcite-pick-list/shared-list-render.tsx | 3 --- .../calcite-radio-group-item.tsx | 4 +--- src/components/calcite-rating/calcite-rating.tsx | 1 - .../calcite-split-button/calcite-split-button.tsx | 7 +------ .../calcite-tab-title/calcite-tab-title.tsx | 2 -- src/components/functional/CalciteExpandToggle.tsx | 3 +-- 20 files changed, 22 insertions(+), 84 deletions(-) diff --git a/src/components/calcite-avatar/calcite-avatar.tsx b/src/components/calcite-avatar/calcite-avatar.tsx index b21305cbe8b..e21b180b5ce 100644 --- a/src/components/calcite-avatar/calcite-avatar.tsx +++ b/src/components/calcite-avatar/calcite-avatar.tsx @@ -1,5 +1,4 @@ import { Component, Element, h, Prop, State } from "@stencil/core"; -import { getElementDir } from "../../utils/dom"; import { isValidHex } from "../calcite-color-picker/utils"; import { Scale } from "../interfaces"; import { hexToHue, stringToHex } from "./utils"; @@ -66,23 +65,15 @@ export class CalciteAvatar { //-------------------------------------------------------------------------- private determineContent() { - const dir = getElementDir(this.el); - if (this.thumbnail && !this.error) { return ( - (this.error = true)} - src={this.thumbnail} - /> + (this.error = true)} src={this.thumbnail} /> ); } const initials = this.generateInitials(); const backgroundColor = this.generateFillColor(); return ( - + {initials ? (