| 1 |
import { __ } from '@wordpress/i18n'; |
| 2 |
|
| 3 |
import { generateTypographyAttributes, generateResponsiveRangeAttributes, generateDimensionsAttributes, generateBorderShadowAttributes } from '../../../util/helpers'; |
| 4 |
import * as prefixes from './typographyPrefixConstants'; |
| 5 |
import { NAVIGATION_ARROW_SIZE, NAVIGATION_BOX_PADDING, NAVIGATION_BOX_MARGIN, NAVIGATION_BOX_BORDER, NAVIGATION_ARROW_PADDING, NAVIGATION_ARROW_MARGIN } from './constants'; |
| 6 |
|
| 7 |
const attributes = { |
| 8 |
// the following 4 attributes is must required for responsive options and asset generation for frontend |
| 9 |
// responsive control attributes ⬇ |
| 10 |
resOption: { |
| 11 |
type: 'string', |
| 12 |
default: 'Desktop', |
| 13 |
}, |
| 14 |
// blockId attribute for making unique className and other uniqueness ⬇ |
| 15 |
blockId: { |
| 16 |
type: 'string', |
| 17 |
}, |
| 18 |
blockRoot: { |
| 19 |
type: 'string', |
| 20 |
default: 'better_docs', |
| 21 |
}, |
| 22 |
// blockMeta is for keeping all the styles ⬇ |
| 23 |
blockMeta: { |
| 24 |
type: 'object', |
| 25 |
}, |
| 26 |
navigation_text_color:{ |
| 27 |
type:'string', |
| 28 |
default:'#3f5876' |
| 29 |
}, |
| 30 |
navigation_text_hover_color:{ |
| 31 |
type:'string', |
| 32 |
default:'#3f5876' |
| 33 |
}, |
| 34 |
navigation_box_color:{ |
| 35 |
type:"string", |
| 36 |
default:'#FFFFFF00' |
| 37 |
}, |
| 38 |
...generateTypographyAttributes(Object.values(prefixes)), |
| 39 |
...generateResponsiveRangeAttributes(NAVIGATION_ARROW_SIZE), |
| 40 |
...generateDimensionsAttributes(NAVIGATION_BOX_PADDING), |
| 41 |
...generateDimensionsAttributes(NAVIGATION_BOX_MARGIN), |
| 42 |
...generateBorderShadowAttributes(NAVIGATION_BOX_BORDER), |
| 43 |
...generateDimensionsAttributes(NAVIGATION_ARROW_PADDING), |
| 44 |
...generateDimensionsAttributes(NAVIGATION_ARROW_MARGIN), |
| 45 |
navigation_arrow_color:{ |
| 46 |
type:'string', |
| 47 |
default:'#5edf8e' |
| 48 |
} |
| 49 |
} |
| 50 |
|
| 51 |
export default attributes; |
| 52 |
|