Even a small amount of onion can be toxic to a dog, and can cause anemia in dogs after about 1-3 days after consumption. Cooking the onions does not reduce the toxicity of the compound.
If you think your dog has eaten onions or anything containing onions, it is important to take them to a veterinarian immediately.