Closed tomusborne closed 1 year ago
This fixes some bugs in setDeviceAttributes so we can easily add new device attributes to an object.
setDeviceAttributes
We just need to pass the object name as the second parameter in setDeviceAttributes():
setDeviceAttributes()
setDeviceAttributes( { textAlign: 'center' }, 'typography' )
Not sure if this means we can ditch the attributesWithDevice array, as we can choose to only use useDeviceAttributes with attributes that have support for devices. Only issue there is if we're passing a mix of attributes with and without devices.
attributesWithDevice
useDeviceAttributes
This fixes some bugs in
setDeviceAttributes
so we can easily add new device attributes to an object.We just need to pass the object name as the second parameter in
setDeviceAttributes()
:setDeviceAttributes( { textAlign: 'center' }, 'typography' )
Not sure if this means we can ditch the
attributesWithDevice
array, as we can choose to only useuseDeviceAttributes
with attributes that have support for devices. Only issue there is if we're passing a mix of attributes with and without devices.