File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
packages/app/src/app/pages/Sandbox/Editor/Workspace/Dependencies Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ export const FontPicker = ({
2222 const manager = new FontManager (
2323 apiKey ,
2424 activeFontFamily ,
25- { ...OPTIONS_DEFAULTS , limit : 800 } ,
25+ { ...OPTIONS_DEFAULTS , limit : 200 } ,
2626 onChange
2727 ) ;
2828 setFontManager ( manager ) ;
Original file line number Diff line number Diff line change @@ -9,16 +9,22 @@ const getFamily = search => {
99 const hashes = search . slice ( search . indexOf ( '?' ) + 1 ) . split ( '&' ) ;
1010 const family = hashes
1111 . find ( hash => hash . split ( '=' ) [ 0 ] === 'family' )
12- . split ( '=' ) [ 1 ]
13- . split ( '+' )
14- . join ( ' ' ) ;
12+ . split ( '=' ) [ 1 ] ;
1513
16- return family ;
14+ return {
15+ name : family . split ( '+' ) . join ( ' ' ) ,
16+ id : family
17+ . split ( '+' )
18+ . join ( '-' )
19+ . toLowerCase ( ) ,
20+ } ;
1721} ;
1822
1923const ExternalResource = ( { removeResource, resource } ) => (
2024 < EntryContainer >
21- < Link href = { resource } > { getFamily ( resource ) } </ Link >
25+ < Link id = { `font-button-${ getFamily ( resource ) . id } ` } href = { resource } >
26+ { getFamily ( resource ) . name }
27+ </ Link >
2228 < IconArea >
2329 < Icon onClick = { ( ) => removeResource ( resource ) } >
2430 < CrossIcon />
You can’t perform that action at this time.
0 commit comments