Skip to content

Commit

Permalink
Rename Alignment -> ALIGNMENT and update dependecies
Browse files Browse the repository at this point in the history
  • Loading branch information
aavishkarmishra committed Aug 15, 2024
1 parent de37b17 commit ee57038
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"typescript": "^5.4.5",
"vite": "^4.5.0",
"vite-plugin-css-injected-by-js": "^3.3.0",
"vite-plugin-dts": "^3.9.1",
"@editorjs/dom": "^0.0.1"
"vite-plugin-dts": "^3.9.1"
},
"dependencies": {
"@codexteam/icons": "^0.3.2"
"@codexteam/icons": "^0.3.2",
"@editorjs/dom": "^0.0.1"
}
}
26 changes: 13 additions & 13 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export interface QuoteConfig extends ToolConfig {
/**
* Default alignment for the quote.
*/
defaultAlignment: Alignment;
defaultAlignment: ALIGNMENT;
}

/**
Expand All @@ -53,7 +53,7 @@ export interface QuoteData {
/**
* The alignment of the quote.
*/
alignment: Alignment;
alignment: ALIGNMENT;
}

/**
Expand Down Expand Up @@ -113,10 +113,10 @@ interface QuoteCSS {
}

/**
* @typedef {Enum} Alignment
* @typedef {Enum} ALIGNMENT
* @description Enum for Quote Alignment
*/
enum Alignment {
enum ALIGNMENT {
left = "left",
center = "center",
}
Expand Down Expand Up @@ -259,12 +259,12 @@ export default class Quote implements BlockTool {
* Allowed quote alignments
*
* @public
* @returns {Record<string, Alignment> }
* @returns {Record<string, ALIGNMENT> }
*/
static get ALIGNMENTS(): Record<string, Alignment> {
static get ALIGNMENTS(): Record<string, ALIGNMENT> {
return {
left: Alignment.left,
center: Alignment.center,
left: ALIGNMENT.left,
center: ALIGNMENT.center,
};
}

Expand All @@ -274,7 +274,7 @@ export default class Quote implements BlockTool {
* @public
* @returns {string}
*/
static get DEFAULT_ALIGNMENT(): Alignment {
static get DEFAULT_ALIGNMENT(): ALIGNMENT {
return Quote.ALIGNMENTS.left;
}

Expand Down Expand Up @@ -321,14 +321,14 @@ export default class Quote implements BlockTool {
*
* @returns {*[]}
*/
get settings(): { name: Alignment; icon: string }[] {
get settings(): { name: ALIGNMENT; icon: string }[] {
return [
{
name: Alignment.left,
name: ALIGNMENT.left,
icon: IconAlignLeft,
},
{
name: Alignment.center,
name: ALIGNMENT.center,
icon: IconAlignCenter,
},
];
Expand Down Expand Up @@ -420,7 +420,7 @@ export default class Quote implements BlockTool {
* @param {string} tune - alignment
* @private
*/
_toggleTune(tune: Alignment) {
_toggleTune(tune: ALIGNMENT) {
this._data.alignment = tune;
}
}

0 comments on commit ee57038

Please sign in to comment.