golden hour
/home/godaofbq/hyperxpod.com/wp-content/plugins/essential-blocks/src/global-styles/block-defaults
⬆️ Go Up
Upload
File/Folder
Size
Actions
accordion.js
15.56 KB
Del
OK
advanced-heading.js
16.4 KB
Del
OK
advanced-image.js
15.16 KB
Del
OK
advanced-navigation.js
65.16 KB
Del
OK
advanced-tabs.js
25.2 KB
Del
OK
advanced-video.js
25.36 KB
Del
OK
button.js
10.43 KB
Del
OK
call-to-action.js
13.69 KB
Del
OK
countdown.js
20.15 KB
Del
OK
dual-button.js
18.58 KB
Del
OK
feature-list.js
17.53 KB
Del
OK
flipbox.js
51.14 KB
Del
OK
fluent-forms.js
45.16 KB
Del
OK
form.js
86.84 KB
Del
OK
google-map.js
7.13 KB
Del
OK
image-comparison.js
16.9 KB
Del
OK
image-gallery.js
23.72 KB
Del
OK
infobox.js
34.06 KB
Del
OK
instagram-feed.js
20.11 KB
Del
OK
interactive-promo.js
7.38 KB
Del
OK
nft-gallery.js
22.14 KB
Del
OK
notice.js
5.16 KB
Del
OK
number-counter.js
23.47 KB
Del
OK
openverse.js
8.31 KB
Del
OK
parallax-slider.js
12.09 KB
Del
OK
popup.js
35.38 KB
Del
OK
post-carousel.js
50.66 KB
Del
OK
post-grid.js
51.85 KB
Del
OK
pricing-table.js
41.41 KB
Del
OK
progress-bar.js
21.31 KB
Del
OK
row.js
7.92 KB
Del
OK
slider.js
24.06 KB
Del
OK
social-share.js
14.19 KB
Del
OK
social.js
15.45 KB
Del
OK
table-of-contents.js
27.64 KB
Del
OK
team-member.js
38.59 KB
Del
OK
testimonial.js
17.88 KB
Del
OK
toggle-content.js
18.12 KB
Del
OK
typing-text.js
9.23 KB
Del
OK
woo-product-grid.js
29.08 KB
Del
OK
wpforms.js
35.22 KB
Del
OK
wrapper.js
3.4 KB
Del
OK
Edit: advanced-heading.js
/** * WordPress dependencies */ import { __ } from "@wordpress/i18n"; import { PanelBody, SelectControl, ToggleControl, TextControl, TextareaControl, Button, ButtonGroup, BaseControl, TabPanel, ColorPicker, } from "@wordpress/components"; import { ResponsiveDimensionsControl, TypographyDropdown, BorderShadowControl, ResponsiveRangeController, BackgroundControl, ColorControl, EBIconPicker, useBlockDefaults, withBlockContext } from "@essential-blocks/controls"; /** * Internal depencencies */ import { WRAPPER_BG, WRAPPER_MARGIN, WRAPPER_PADDING, WRAPPER_BORDER_SHADOW, TITLE_MARGIN, SUBTITLE_MARGIN, SEPARATOR_MARGIN, SEPARATOR_LINE_SIZE, SEPARATOR_ICON_SIZE, SEPARATOR_WIDTH, SEPARATOR_POSITION, NORMAL_HOVER, UNIT_TYPES, SEPARATOR_UNIT_TYPES, PRESETS, TEXT_ALIGN, HEADING, SEPERATOR_STYLES, SEPARATOR_TYPE, } from "@essential-blocks/blocks/advanced-heading/src/constants/constants"; import { TITLE_TYPOGRAPHY, SUBTITLE_TYPOGRAPHY, } from "@essential-blocks/blocks/advanced-heading/src/constants/typographyPrefixConstants"; import objAttributes from "@essential-blocks/blocks/advanced-heading/src/attributes"; function AdvancedHeading(props) { const { blockDefaults, setBlockDefaults, name, deviceType, handleBlockDefault } = props; const { tagName, subtitleTagName, titleColor, titleHoverColor, subtitleColor, subtitleHoverColor, separatorColor, separatorHoverColor, align, displaySubtitle, displaySeperator, seperatorPosition, seperatorType, seperatorStyle, separatorIcon, } = blockDefaults; const isDefaultSet = useBlockDefaults(name, blockDefaults, setBlockDefaults, objAttributes) return ( <> {isDefaultSet && ( <div className="eb-panel-control"> <PanelBody title={__("General", "essential-blocks")} initialOpen={true}> <BaseControl label={__("Alignment", "essential-blocks")} id="eb-advance-heading-alignment"> <ButtonGroup id="eb-advance-heading-alignment"> {TEXT_ALIGN.map((item, key) => ( <Button key={key} // isLarge isPrimary={align === item.value} isSecondary={align !== item.value} onClick={() => handleBlockDefault({ align: item.value, }) } > {item.label} </Button> ))} </ButtonGroup> </BaseControl> <BaseControl label={__("Title Level", "essential-blocks")} id="eb-advance-heading-alignment"> <ButtonGroup className="eb-advance-heading-alignment eb-html-tag-buttongroup"> {HEADING.map((item, key) => ( <Button key={key} // isLarge isPrimary={tagName === item.value} isSecondary={tagName !== item.value} onClick={() => handleBlockDefault({ tagName: item.value, }) } > {item.label} </Button> ))} </ButtonGroup> </BaseControl> <ToggleControl label={__("Display Subtitle", "essential-blocks")} checked={displaySubtitle} onChange={() => handleBlockDefault({ displaySubtitle: !displaySubtitle, }) } /> {displaySubtitle && ( <> <BaseControl label={__("Subtitle Level", "essential-blocks")} id="eb-advance-heading-alignment" > <ButtonGroup className="eb-advance-heading-alignment eb-html-tag-buttongroup"> {HEADING.map((item, key) => ( <Button key={key} // isLarge isPrimary={subtitleTagName === item.value} isSecondary={subtitleTagName !== item.value} onClick={() => handleBlockDefault({ subtitleTagName: item.value, }) } > {item.label} </Button> ))} </ButtonGroup> </BaseControl> </> )} <ToggleControl label={__("Display Separator", "essential-blocks")} checked={displaySeperator} onChange={() => handleBlockDefault({ displaySeperator: !displaySeperator, }) } /> </PanelBody> <PanelBody title={__("Title Styles", "essential-blocks")} initialOpen={true}> <TypographyDropdown baseLabel={__("Title Typography", "essential-blocks")} typographyPrefixConstant={TITLE_TYPOGRAPHY} /> <ColorControl label={"Title Color"} color={titleColor} onChange={(value) => handleBlockDefault({ titleColor: value })} defaultValue={titleColor} /> <ColorControl label={"Title Hover Color"} color={titleHoverColor} onChange={(value) => handleBlockDefault({ titleHoverColor: value })} defaultValue={titleHoverColor} /> <ResponsiveDimensionsControl controlName={TITLE_MARGIN} baseLabel="Title Margin" /> </PanelBody> {displaySubtitle && ( <PanelBody title={__("Subtitle Styles", "essential-blocks")} initialOpen={true}> <TypographyDropdown baseLabel={__("Subtitle Typography", "essential-blocks")} typographyPrefixConstant={SUBTITLE_TYPOGRAPHY} /> <ColorControl label={"Subtitle Color"} color={subtitleColor} onChange={(value) => handleBlockDefault({ subtitleColor: value })} defaultValue={subtitleColor} /> <ColorControl label={"Subtitle Hover Color"} color={subtitleHoverColor} onChange={(value) => handleBlockDefault({ subtitleHoverColor: value, }) } defaultValue={subtitleHoverColor} /> <ResponsiveDimensionsControl controlName={SUBTITLE_MARGIN} baseLabel="Subtitle Margin" /> </PanelBody> )} {displaySeperator && ( <PanelBody title={__("Separator", "essential-blocks")} initialOpen={false}> <SelectControl label={__("Separator Position", "essential-blocks")} value={seperatorPosition} options={SEPARATOR_POSITION} onChange={(seperatorPosition) => handleBlockDefault({ seperatorPosition })} /> <BaseControl label={__("Separator Type", "essential-blocks")} id="eb-advance-heading-alignment" > <ButtonGroup id="eb-advance-heading-alignment"> {SEPARATOR_TYPE.map((item, key) => ( <Button key={key} // isLarge isPrimary={seperatorType === item.value} isSecondary={seperatorType !== item.value} onClick={() => handleBlockDefault({ seperatorType: item.value, }) } > {item.label} </Button> ))} </ButtonGroup> </BaseControl> {seperatorType === "line" && ( <> <SelectControl label={__("Separator Style", "essential-blocks")} value={seperatorStyle} options={SEPERATOR_STYLES} onChange={(seperatorStyle) => handleBlockDefault({ seperatorStyle, }) } /> <ResponsiveRangeController baseLabel={__("Separator Height", "essential-blocks")} controlName={SEPARATOR_LINE_SIZE} units={UNIT_TYPES} min={0} max={100} step={1} /> </> )} {seperatorType === "icon" && ( <> <EBIconPicker value={separatorIcon} onChange={(icon) => handleBlockDefault({ separatorIcon: icon, }) } title={__( "Select Icon", "essential-blocks-pro" )} /> <ResponsiveRangeController baseLabel={__("Icon Size", "essential-blocks")} controlName={SEPARATOR_ICON_SIZE} units={UNIT_TYPES} min={0} max={100} step={1} /> </> )} <ResponsiveRangeController baseLabel={__("Separator Width", "essential-blocks")} controlName={SEPARATOR_WIDTH} units={SEPARATOR_UNIT_TYPES} min={0} max={300} step={1} /> <ColorControl label={"Separator Color"} color={separatorColor} onChange={(value) => handleBlockDefault({ separatorColor: value, }) } defaultValue={separatorColor} /> <ColorControl label={"Separator Hover Color"} color={separatorHoverColor} onChange={(value) => handleBlockDefault({ separatorHoverColor: value, }) } defaultValue={separatorHoverColor} /> <ResponsiveDimensionsControl controlName={SEPARATOR_MARGIN} baseLabel="Separator Margin" /> </PanelBody> )} <PanelBody title={__("Advanced", "essential-blocks")} initialOpen={true}> <PanelBody> <ResponsiveDimensionsControl controlName={WRAPPER_MARGIN} baseLabel="Wrapper Margin" /> <ResponsiveDimensionsControl controlName={WRAPPER_PADDING} baseLabel="Wrapper Padding" /> </PanelBody> <PanelBody title={__("Wrapper Background", "essential-blocks")} initialOpen={false}> <BackgroundControl controlName={WRAPPER_BG} /> </PanelBody> <PanelBody title={__("Wrapper Border & Shadow")} initialOpen={false}> <BorderShadowControl controlName={WRAPPER_BORDER_SHADOW} // noShadow // noBorder /> </PanelBody> </PanelBody> </div> )} </> ); } export default withBlockContext(objAttributes)(AdvancedHeading);
Save