Skip to content

Commit

Permalink
chore: update kbd component
Browse files Browse the repository at this point in the history
  • Loading branch information
BayBreezy committed Nov 15, 2024
1 parent 2f5b36f commit 66b58f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/comps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,7 @@ export default [
fileName: "Kbd.vue",
dirPath: "components/UI",
fileContent:
'<template>\n <Primitive :class="styles({ size, class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n<script setup lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** The size of the component */\n size?: VariantProps<typeof styles>["size"];\n /** Custom class(es) to add to the parent */\n class?: any;\n }\n >(),\n {\n as: "kbd",\n size: "sm",\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "size");\n\n const styles = tv({\n base: "pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md border border-border bg-muted font-sans font-medium",\n variants: {\n size: {\n xs: "h-5 min-h-[16px] px-1 text-[10px]",\n sm: "h-6 min-h-[20px] px-1.5 text-[11px]",\n md: "h-7 min-h-[24px] px-2 text-[12px]",\n },\n },\n defaultVariants: {\n size: "sm",\n },\n });\n</script>\n',
'<template>\n <Primitive :class="styles({ size, variant, class: props.class })" v-bind="forwarded">\n <slot />\n </Primitive>\n</template>\n<script setup lang="ts">\n import { Primitive } from "radix-vue";\n import type { PrimitiveProps } from "radix-vue";\n\n const props = withDefaults(\n defineProps<\n PrimitiveProps & {\n /** The size of the component */\n size?: VariantProps<typeof styles>["size"];\n /** Custom class(es) to add to the parent */\n class?: any;\n /** The variant of the component */\n variant?: VariantProps<typeof styles>["variant"];\n }\n >(),\n {\n as: "kbd",\n size: "sm",\n }\n );\n\n const forwarded = reactiveOmit(props, "class", "size");\n\n const styles = tv({\n base: "pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded-md border border-border bg-muted font-sans font-medium",\n variants: {\n size: {\n xs: "h-5 min-h-[16px] px-1 text-[10px]",\n sm: "h-6 min-h-[20px] px-1.5 text-[11px]",\n md: "h-7 min-h-[24px] px-2 text-[12px]",\n },\n variant: {\n solid: "bg-muted",\n outline: "bg-transparent",\n },\n },\n defaultVariants: {\n size: "sm",\n variant: "solid",\n },\n });\n</script>\n',
},
],
utils: [],
Expand Down

0 comments on commit 66b58f7

Please sign in to comment.