Skip to content

Commit

Permalink
fix: text content theme (#267)
Browse files Browse the repository at this point in the history
  • Loading branch information
itwillwork authored Jan 30, 2025
1 parent b0821e4 commit aa2963c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
4 changes: 0 additions & 4 deletions src/lib/kit/utils/__tests__/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,6 @@ describe('kit/utils/common', () => {
viewSpec: {addButtonPosition: 'down'},
});

expect(prepareSpec({viewSpec: {themeLabel: 'WARNING'}} as any)).toMatchObject({
viewSpec: {textContentParams: {themeLabel: 'warning'}},
});

expect(prepareSpec({viewSpec: {oneOfParams: {toggler: 'SELECT'}}} as any)).toMatchObject({
viewSpec: {oneOfParams: {toggler: 'select'}},
});
Expand Down
7 changes: 0 additions & 7 deletions src/lib/kit/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ export const prepareSpec = <Type extends Spec>(
result.viewSpec.addButtonPosition = result.viewSpec.addButtonPosition.toLowerCase();
}

if (isString(result.viewSpec?.themeLabel)) {
result.viewSpec.textContentParams = {
...result.viewSpec.textContentParams,
themeLabel: result.viewSpec.themeLabel.toLowerCase(),
};
}

if (isString(result.viewSpec?.oneOfParams?.toggler)) {
result.viewSpec.oneOfParams.toggler = result.viewSpec.oneOfParams.toggler.toLowerCase();
}
Expand Down

0 comments on commit aa2963c

Please sign in to comment.