Skip to content

Commit e2674c5

Browse files
authored
fix(typography): correct Kbd Garden ID data attribute (#2042)
1 parent e0d87d3 commit e2674c5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

packages/typography/src/elements/Kbd.spec.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ describe('Kbd', () => {
1616
expect(container.firstChild!.nodeName).toBe('KBD');
1717
});
1818

19+
it('applies the expected Garden ID attribute', () => {
20+
const { container } = render(<Kbd />);
21+
22+
expect(container.firstChild).toHaveAttribute('data-garden-id', 'typography.kbd');
23+
});
24+
1925
it('forces left-to-right text direction', () => {
2026
const { container } = renderRtl(<Kbd />);
2127

packages/typography/src/styled/StyledKbd.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { componentStyles } from '@zendeskgarden/react-theming';
1111
import { StyledCode } from './StyledCode';
1212
import { IKbdProps } from '../types';
1313

14-
const COMPONENT_ID = 'typography.code';
14+
const COMPONENT_ID = 'typography.kbd';
1515

1616
interface IStyledKbdProps extends ThemeProps<DefaultTheme> {
1717
$size?: IKbdProps['size'];

0 commit comments

Comments
 (0)