Skip to content

Commit

Permalink
updtates naming conventions removing "data-" from attribute names
Browse files Browse the repository at this point in the history
  • Loading branch information
SBBlee committed May 22, 2024
1 parent 5813842 commit cbff73b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/components/atoms/Spinner/Spinner.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ export default class Image extends HTMLElement {
this.shadowRoot.appendChild(spinnerStyles);
// image attributes

const spinnerType = this.getAttribute('data-type');
const spinnerType = this.getAttribute('type');

const spinnerSize = this.getAttribute('data-size');
const spinnerSize = this.getAttribute('size');

const backgroundColor = this.getAttribute('data-background-color');
const backgroundColor = this.getAttribute('background-color');

const displayType = this.getAttribute('data-display-type');
const displayType = this.getAttribute('display-type');
let spinnerSizeClass;

// TODO: Fix old ESLint errors - see issue #1099
Expand Down
8 changes: 4 additions & 4 deletions src/stories/spinner.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export default {
// Template
const Template = (args) => {
const spinner = document.createElement('cod-spinner');
spinner.setAttribute('data-type', args.type);
spinner.setAttribute('data-background-color', args.backgroundColor);
spinner.setAttribute('data-size', args.size);
spinner.setAttribute('data-display-type', args.displayType);
spinner.setAttribute('type', args.type);
spinner.setAttribute('background-color', args.backgroundColor);
spinner.setAttribute('size', args.size);
spinner.setAttribute('display-type', args.displayType);
return spinner;
};

Expand Down

0 comments on commit cbff73b

Please sign in to comment.