Use gen/let to generate :type first, then branch the rest of the map on it — this expresses a cross-key invariant (e.g. :info requires [:button :dismiss] to be present and non-nil, :critical allows it to be absent).
(require '[clojure.test.check.generators :as gen])
(def alert-widget-gen