-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FontFamilyControl: Deprecate bottom margin (#64280)
* FontFamilyControl: Deprecate bottom margin * Add changelog Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org>
- Loading branch information
1 parent
a52b951
commit 8b5cdba
Showing
4 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 54 additions & 0 deletions
54
packages/block-editor/src/components/font-family/stories/index.story.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { useState } from '@wordpress/element'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import FontFamilyControl from '..'; | ||
|
||
export default { | ||
component: FontFamilyControl, | ||
title: 'BlockEditor/FontFamilyControl', | ||
}; | ||
|
||
export const Default = { | ||
render: function Template( props ) { | ||
const [ value, setValue ] = useState(); | ||
return ( | ||
<FontFamilyControl | ||
onChange={ setValue } | ||
value={ value } | ||
{ ...props } | ||
/> | ||
); | ||
}, | ||
args: { | ||
fontFamilies: [ | ||
{ | ||
fontFace: [ | ||
{ | ||
fontFamily: 'Inter', | ||
fontStretch: 'normal', | ||
fontStyle: 'normal', | ||
fontWeight: '200 900', | ||
src: [ | ||
'file:./assets/fonts/inter/Inter-VariableFont_slnt,wght.ttf', | ||
], | ||
}, | ||
], | ||
fontFamily: '"Inter", sans-serif', | ||
name: 'Inter', | ||
slug: 'inter', | ||
}, | ||
{ | ||
fontFamily: | ||
'-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif', | ||
name: 'System Font', | ||
slug: 'system-font', | ||
}, | ||
], | ||
__nextHasNoMarginBottom: true, | ||
}, | ||
}; |