Skip to content

Commit 5c47a42

Browse files
authored
Fix: lineHeight not applied to UnfitText (FormidableLabs#682)
* lineHeight not applied to UnfitText * Update text snapshot to include new lineHeight prop * Add UnfitText to TS defs
1 parent 45a91fb commit 5c47a42

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ declare module 'spectacle' {
307307
class TableRow extends React.Component<BaseProps> {}
308308

309309
class Text extends React.Component<TextProps> {}
310+
311+
class UnfitText extends React.Component<TextProps> {}
310312
}
311313

312314
declare module 'spectacle/lib/utils/preloader' {

src/components/__snapshots__/text.test.js.snap

+2-1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ exports[`<Text /> should render a <p> with text for the default configuration. 1
4949
lineHeight={1}
5050
>
5151
<Styled(p)
52+
lineHeight={1}
5253
styles={
5354
Object {
5455
"base": Object {},
@@ -61,7 +62,7 @@ exports[`<Text /> should render a <p> with text for the default configuration. 1
6162
}
6263
>
6364
<p
64-
className="css-cmzp7u e1kfncg52"
65+
className="css-1izsweo e1kfncg52"
6566
>
6667
Spectacle!
6768
</p>

src/components/text.js

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ export default class Text extends Component {
107107
) : (
108108
<UnfitText
109109
className={this.props.className}
110+
lineHeight={lineHeight}
110111
styles={{
111112
context: this.context.styles.components.text,
112113
base: getStyles.call(this),

0 commit comments

Comments
 (0)