Skip to content

Commit

Permalink
feat(text): change preset caption tag to span
Browse files Browse the repository at this point in the history
Signed-off-by: astagnol <[email protected]>
  • Loading branch information
astagnol authored and dpellier committed Nov 13, 2024
1 parent 72cf7f3 commit b993eb0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export class OdsText {
case ODS_TEXT_PRESET.paragraph:
return 'p';
case ODS_TEXT_PRESET.caption:
return 'caption';
return 'span';
case ODS_TEXT_PRESET.code:
return 'code';
case ODS_TEXT_PRESET.span:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ describe('ods-text rendering', () => {
it('should render with preset caption', async() => {
await setup('<ods-text preset="caption">some text</ods-text>');
expect(el.getAttribute('preset')).toBe('caption');
expect(part.tagName).toBe('CAPTION');
expect(part.tagName).toBe('SPAN');
});

it('should render with preset code', async() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('ods-text rendering', () => {
await setup(`<ods-text preset="${presetValue}"></ods-text>`);

expect(part?.classList.contains('ods-text--caption')).toBe(true);
expect(part?.tagName).toBe('CAPTION');
expect(part?.tagName).toBe('SPAN');
});
});
});

0 comments on commit b993eb0

Please sign in to comment.