Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BBT-94] Fix: Re-add typography styles component #41

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/editor/components/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { useContext } from '@wordpress/element';

import Border from './StylesBorder';
import Color from './StylesColor';
import Typography from './StylesTypography';
import Filter from './StylesFilter';
import Spacing from './StylesSpacing';
import Dimensions from './StylesDimensions';
Expand Down Expand Up @@ -31,6 +32,10 @@ const Styles = ( { path } ) => {

const hasBorderStyles = getThemeOption( `${ path }.border`, themeConfig );
const hasColorStyles = getThemeOption( `${ path }.color`, themeConfig );
const hasTypographyStyles = getThemeOption(
`${ path }.typography`,
themeConfig
);
const hasFilterStyles = getThemeOption( `${ path }.filter`, themeConfig );
const hasSpacingStyles = getThemeOption( `${ path }.spacing`, themeConfig );
const hasDimensionsStyles = getThemeOption(
Expand All @@ -47,6 +52,9 @@ const Styles = ( { path } ) => {
<Border selector={ `${ path }.border` } />
) }
{ hasColorStyles && <Color selector={ `${ path }.color` } /> }
{ hasTypographyStyles && (
<Typography selector={ `${ path }.typography` } />
) }
{ hasFilterStyles && (
<Filter selector={ `${ path }.filter` } />
) }
Expand Down