@wordpress/block-library
Version:
Block library for the WordPress editor.
74 lines (68 loc) • 1.41 kB
JavaScript
/**
* Internal dependencies
*/
import migrateFontFamily from '../utils/migrate-font-family';
const v1 = {
attributes: {
textAlign: {
type: 'string'
},
level: {
type: 'number',
default: 2
},
isLink: {
type: 'boolean',
default: false
},
rel: {
type: 'string',
attribute: 'rel',
default: ''
},
linkTarget: {
type: 'string',
default: '_self'
}
},
supports: {
align: ['wide', 'full'],
html: false,
color: {
gradients: true,
link: true
},
spacing: {
margin: true
},
typography: {
fontSize: true,
lineHeight: true,
__experimentalFontFamily: true,
__experimentalFontWeight: true,
__experimentalFontStyle: true,
__experimentalTextTransform: true
}
},
save() {
return null;
},
migrate: migrateFontFamily,
isEligible(_ref) {
var _style$typography;
let {
style
} = _ref;
return style === null || style === void 0 ? void 0 : (_style$typography = style.typography) === null || _style$typography === void 0 ? void 0 : _style$typography.fontFamily;
}
};
/**
* New deprecations need to be placed first
* for them to have higher priority.
*
* Old deprecations may need to be updated as well.
*
* See block-deprecation.md
*/
export default [v1];
//# sourceMappingURL=deprecated.js.map