Is there support for type object for block attributes??
Thanks.
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It only takes a minute to sign up.
Sign up to join this communityYes, there is. It will be like this:
spacing: {
type: 'object',
default: {
margin: {
global: { ...DIRECTIONS },
tablet: { ...DIRECTIONS },
desktop: { ...DIRECTIONS },
unit: 'px',
size: 0,
sync: false,
syncTablet: false,
syncDesktop: false
},
padding: {
global: { ...DIRECTIONS },
tablet: { ...DIRECTIONS },
desktop: { ...DIRECTIONS },
unit: 'px',
size: 0,
syncGlobal: false,
syncTablet: false,
syncDesktop: false
}
},
},