elegantthemes / Divi-Beta

8 stars 0 forks source link

D5 :: Add custom fonts to the font family list in the FontHeaderGroup component for headings #98

Open shohel opened 1 month ago

shohel commented 1 month ago

Problem Description

  1. Describe what you did There is no way to override/add fonts in the font-family list for FontHeaderGroup component

Discord - https://discord.com/channels/1041765492907589683/1294325179387875421

  1. Describe what you expected to happen I would like to see my custom fonts in the font family list.

  2. Describe what actually happened I can't add my own custom fonts. Example below.

<FontHeaderGroup
                    title="Footer Heading Text"
                    attrName="footer.decoration.headingFont"
                    defaultGroupAttr={defaultSettingsAttrs?.footer?.decoration?.headingFont?.asMutable({ deep: true }) ?? {}}
                    fields={{
                        h1: {
                            family:{
                                component: {
                                    type: 'field',
                                    name: 'divi/select-font',
                                    props: {
                                        googleFonts: ['TestFont 1', 'TestFont 2'],
                                    }
                                }
                            }
                        },
                    }}
                />

It should override the google fonts in the font family list.

Detailed Steps To Reproduce

Please provide a detailed list of exact steps that reproduce the issue. 1. 2. 3.

Related Links or Information

If applicable, please provide links to any related issues, PRs, discord discussions, or other information. Discord Discussion: How to add custom field to a FonHeaderGroup tab

Screenshot and/or gif

Ideally a video screencast or gif of the issue being reproduced. If not, a screenshot of the issue is acceptable and annotating the screenshot with a red circle/arrow and text, as applicable, is helpful.

System Information

Due Diligence Checklist