Adds custom font size to list of font sizes options (#27785)

This commit is contained in:
Catherine Liu 2018-12-26 14:04:58 -07:00 committed by GitHub
parent 580cfccad8
commit 1fd4de0b3b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,11 @@ export const TextStylePicker = ({
['underline']: Boolean(underline),
};
if (!isNaN(size) && fontSizes.indexOf(Number(size)) === -1) {
fontSizes.push(Number(size));
fontSizes.sort((a, b) => a - b);
}
const doChange = (propName, value) => {
onChange({
family,