Skip to content

Commit

Permalink
fix(react-card): improve api description
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmoura committed Nov 2, 2022
1 parent 3c1b9fb commit 64ad7aa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utili
/**
* Card refs to the root element slot.
*/

export type CardRefElement = HTMLDivElement | HTMLButtonElement | HTMLAnchorElement;

/**
* Card selected event type
*
* This event is fired when a selectable card changes its selection state.
*/

export type CardOnSelectEvent = React.MouseEvent | React.KeyboardEvent | React.ChangeEvent;

/**
Expand Down Expand Up @@ -48,13 +46,13 @@ export type CardProps = ComponentProps<CardSlots> & {
* The card will have a shadow, border and background color.
*
* `filled-alternative`
* This appearance is similar to `filled` but the background color will be a little darker.
* This appearance is similar to `filled`, but the background color will be a little darker.
*
* `outline`
* This appearance is similar to `filled` but the background color will be transparent and no shadow applied.
* This appearance is similar to `filled`, but the background color will be transparent and no shadow applied.
*
* `subtle`
* This appearance is similar to `filled-alternative` but no border is applied.
* This appearance is similar to `filled-alternative`, but no border is applied.
*
* @default 'filled'
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const useCardFocusAttributes = ({ focusMode = 'off' }: CardProps, { isInteractiv
* before being passed to renderCard_unstable.
*
* @param props - props from this instance of Card
* @param ref - reference to root HTMLElement of Card
* @param ref - reference to the root element of Card
*/
export const useCard_unstable = (props: CardProps, ref: React.Ref<CardRefElement>): CardState => {
const { appearance = 'filled', orientation = 'vertical', size = 'medium', as = 'div' } = props;
Expand Down

0 comments on commit 64ad7aa

Please sign in to comment.