Change _custom_props function to a dictionary