diff --git a/.changeset/hip-walls-tan.md b/.changeset/hip-walls-tan.md new file mode 100644 index 000000000..1aca8e8e7 --- /dev/null +++ b/.changeset/hip-walls-tan.md @@ -0,0 +1,5 @@ +--- +"@vygruppen/spor-react": patch +--- + +Update docs for PressableCard and RadioCard diff --git a/apps/docs/package.json b/apps/docs/package.json index bb6e7a458..6d74e23fa 100644 --- a/apps/docs/package.json +++ b/apps/docs/package.json @@ -1,6 +1,6 @@ { "private": true, - "version": "0.0.25", + "version": "0.0.26", "name": "@vygruppen/docs", "description": "The Spor documentation", "license": "MIT", diff --git a/packages/spor-react/src/layout/PressableCard.tsx b/packages/spor-react/src/layout/PressableCard.tsx index 3586acb1f..d9621b07e 100644 --- a/packages/spor-react/src/layout/PressableCard.tsx +++ b/packages/spor-react/src/layout/PressableCard.tsx @@ -2,11 +2,9 @@ import React from "react"; import { Box, BoxProps, useStyleConfig } from "@chakra-ui/react"; type PressableCardProps = Omit & { - /** Use "floating" | "accent" | "base". Defaults to base */ + /** Defaults to "base" */ variant: "floating" | "accent" | "base"; - /** Use "sm" | "lg". Defaults to sm */ - size?: "sm" | "lg"; - /** Use "button" | "a" | "label". Defaults to button */ + /** Defaults to "button" */ as: "button" | "a" | "label"; }; @@ -44,11 +42,10 @@ type PressableCardProps = Omit & { export const PressableCard = ({ children, as = "button", - size = "sm", variant = "base", ...props }: PressableCardProps) => { - const styles = useStyleConfig("PressableCard", { variant, size }); + const styles = useStyleConfig("PressableCard", { variant }); return ( {children} diff --git a/packages/spor-react/src/layout/RadioCard.tsx b/packages/spor-react/src/layout/RadioCard.tsx index 114c4be60..2620210bb 100644 --- a/packages/spor-react/src/layout/RadioCard.tsx +++ b/packages/spor-react/src/layout/RadioCard.tsx @@ -12,6 +12,7 @@ import React, { useId } from "react"; type RadioCardProps = UseRadioProps & BoxProps & { children: React.ReactNode; + /** Defaults to "base" */ variant: "floating" | "base"; }; diff --git a/packages/spor-react/src/layout/RadioCardGroup.tsx b/packages/spor-react/src/layout/RadioCardGroup.tsx index 7cbf3bd11..2d0189817 100644 --- a/packages/spor-react/src/layout/RadioCardGroup.tsx +++ b/packages/spor-react/src/layout/RadioCardGroup.tsx @@ -9,7 +9,16 @@ import React, { Children } from "react"; type RadioCardGroupProps = RadioGroupProps & { children: React.ReactNode; props?: RadioGroupProps; + /** Defaults to "row" */ direction?: StackDirection; + /** Defaults to "base" */ + variant?: string; + /** The name of the radio group */ + name?: string; + /** The default value of the radio group */ + defaultValue?: string; + /** The callback function to be called when the radio group value changes */ + onChange?: (value: string) => void; }; /**