score:0

Accepted answer
function PressedButton({ children, pressed, ...rest }) {
  // vvv this was removed vvv
  // const [pressed, setPressed] = useState(false);

  return (
    <Container>
      <Content
        type="button" {...rest}
        pressed={pressed}
        onFocus={() => setPressed(!pressed)}
        >
      {children}
      </Content>
    </Container>
  );
}

Related Query

More Query from same tag