How can I manage multiple product inventory on Shopify?

I sell desks and legs for the desks.

The desks tops come indifferent sizes and thelegs in different colours.

For Example 1 x 1600 desk top and black legs both have different product codes, but are sold as one item.

When the product is sold I would like both items of stock to be knocked off individually.

This is done easily on my old Wordpress Site its called ‘Attribute Stock’ and works perfectly.

Can’t find anything similar with Shopify