20CAKE20.JS
06-components

Components

23

06-components/Counter.tsx

Counter

Support

Support source used by the official components examples.

export type Props = {
  value: number;
  onChange?: (value: number) => void;
};

export default (props: Props) => (
  <Button onClick={() => props.onChange?.(props.value + 1)}>{props.value}</Button>
);