Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

ts react props type

type Props = {
  size: string;
}

const Component = ({ size = 'medium' }: Props) => (
  <div className={cn('spinner', size)} />
);
Source by reactjs.org #
 
PREVIOUS NEXT
Tagged: #ts #react #props #type
ADD COMMENT
Topic
Name
4+1 =