Skip to content

Commit

Permalink
docs(radio): 📝 update jsdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Oct 6, 2021
1 parent 0ffc77e commit cd7b534
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/radio/Radio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ export type RadioOptions = CompositeItemOptions &
* Same as the `value` attribute.
*/
value: string | number;

/**
* Same as the `checked` attribute.
*/
checked?: boolean;

/**
* @private
*/
Expand Down Expand Up @@ -85,7 +87,6 @@ export const useRadio = createHook<RadioOptions, RadioHTMLProps>({
warning(
true,
"Can't determine whether the element is a native radio because `ref` wasn't passed to the component",
"See https://reakit.io/docs/radio",
);
return;
}
Expand Down
1 change: 0 additions & 1 deletion src/radio/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const RadioGroup = createComponent({
useWarning(
!props["aria-label"] && !props["aria-labelledby"],
"You should provide either `aria-label` or `aria-labelledby` props.",
"See https://reakit.io/docs/radio",
);
return useCreateElement(type, props, children);
},
Expand Down
8 changes: 4 additions & 4 deletions src/radio/RadioState.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { useControllableState } from "../utils";

export type RadioState = CompositeState & {
/**
* The `value` attribute of the current checked radio.
* The `value` attribute of the current active radio.
*/
state: string | number | null;
};
Expand All @@ -24,19 +24,19 @@ export type RadioActions = CompositeActions & {

export type RadioInitialState = CompositeInitialState & {
/**
* Default State of the Checkbox for uncontrolled Checkbox.
* Default State of the Radio for uncontrolled Radio.
*
* @default false
*/
defaultState?: RadioState["state"];

/**
* State of the Checkbox for controlled Checkbox..
* State of the Radio for controlled Radio..
*/
state?: RadioState["state"];

/**
* OnChange callback for controlled Checkbox.
* OnChange callback for controlled Radio.
*/
onStateChange?: RadioActions["setState"];
};
Expand Down

1 comment on commit cd7b534

@vercel
Copy link

@vercel vercel bot commented on cd7b534 Oct 6, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.