Skip to content

Commit

Permalink
refactor: 💡 Convert marks to export an enum (#136)
Browse files Browse the repository at this point in the history
This improves typings and provides consistency with blocks and inlines.
  • Loading branch information
kgajera authored Jul 30, 2021
1 parent 48621e9 commit a692e8e
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions packages/rich-text-types/src/marks.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/**
* Map of all Contentful marks.
*/
export default {
BOLD: 'bold',
ITALIC: 'italic',
UNDERLINE: 'underline',
CODE: 'code',
};
enum MARKS {
BOLD = 'bold',
ITALIC = 'italic',
UNDERLINE = 'underline',
CODE = 'code',
}

export default MARKS;

0 comments on commit a692e8e

Please sign in to comment.