Skip to content

Commit 0172bbf

Browse files
committed
refact: remove Kbd css module
1 parent 975904f commit 0172bbf

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/once-ui/components/Kbd.module.scss

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/once-ui/components/Kbd.tsx

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
import React, { ReactNode, forwardRef } from "react";
44

55
import { Flex, Text } from ".";
6-
import classNames from "classnames";
7-
import styles from "./Kbd.module.scss";
86

97
interface KbdProps extends React.ComponentProps<typeof Flex> {
108
label?: string;
@@ -15,7 +13,20 @@ interface KbdProps extends React.ComponentProps<typeof Flex> {
1513

1614
const Kbd = forwardRef<HTMLDivElement, KbdProps>(
1715
({ label, children, className, style, ...rest }, ref) => (
18-
<Flex as="kbd" ref={ref} className={classNames(styles.kbd, className)} style={style} {...rest}>
16+
<Flex
17+
as="kbd"
18+
ref={ref}
19+
justifyContent="center"
20+
minWidth="32"
21+
background="neutral-strong"
22+
radius="s"
23+
paddingX="4"
24+
paddingY="2"
25+
onBackground="neutral-medium"
26+
border="neutral-strong"
27+
className={className}
28+
style={style}
29+
{...rest}>
1930
<Text as="span" variant="label-default-s">
2031
{label || children}
2132
</Text>
@@ -26,4 +37,4 @@ const Kbd = forwardRef<HTMLDivElement, KbdProps>(
2637
Kbd.displayName = "Kbd";
2738

2839
export { Kbd };
29-
export type { KbdProps };
40+
export type { KbdProps };

0 commit comments

Comments
 (0)