File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Allow for ` props.fontSize ` to override the theme's monospace font size in ` CodePane ` . [ #875 ] ( https://github.com/FormidableLabs/spectacle/pull/875 )
56- Surface ` textDecoration ` prop from styled-system for ` Link ` s. [ #869 ] ( https://github.com/FormidableLabs/spectacle/pull/869 )
67
78## 6.0.1
Original file line number Diff line number Diff line change @@ -39,14 +39,20 @@ export default function CodePane(props) {
3939 } , [ themeContext ] ) ;
4040
4141 const fontSize = React . useMemo ( ( ) => {
42+ if ( props && props . fontSize ) {
43+ return props . fontSize ;
44+ }
45+
4246 if (
4347 themeContext &&
4448 themeContext . fontSizes &&
4549 themeContext . fontSizes . monospace
4650 ) {
4751 return themeContext . fontSizes . monospace ;
4852 }
49- return props . fontSize ;
53+
54+ // Default to 15px
55+ return 15 ;
5056 } , [ themeContext , props . fontSize ] ) ;
5157
5258 const preStyles = React . useMemo (
@@ -159,7 +165,6 @@ CodePane.propTypes = {
159165CodePane . defaultProps = {
160166 language : 'javascript' ,
161167 theme : theme ,
162- fontSize : 15 ,
163168 highlightStart : - Infinity ,
164169 highlightEnd : Infinity
165170} ;
You can’t perform that action at this time.
0 commit comments