@imposium-hub/components 1.38.13 → 1.38.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,7 @@ class FontAssetPreview extends React.PureComponent<IFontAssetPreviewProps, undef
50
50
  color: '#000000',
51
51
  background_color: '#ffffff',
52
52
  font_size: 80,
53
+ font_weight: 400,
53
54
  font_type: 'custom',
54
55
  font: name,
55
56
  custom_font_url: url,
@@ -196,7 +196,7 @@ export default class TextLayer extends React.PureComponent<ITextLayerProps, ITex
196
196
  public render() {
197
197
 
198
198
  const {options: {color, background_color, line_height, word_spacing,
199
- letter_spacing, font_size, font, horizontal_alignment, vertical_alignment, text_wrap}} = this.props;
199
+ letter_spacing, font_size, font_weight, font, horizontal_alignment, vertical_alignment, text_wrap}} = this.props;
200
200
 
201
201
  const {fontError} = this.state;
202
202
 
@@ -206,12 +206,15 @@ export default class TextLayer extends React.PureComponent<ITextLayerProps, ITex
206
206
  const lH = (line_height) ? `${line_height}px` : 'normal';
207
207
  const fS = (font_size) ? `${font_size}px` : '0px';
208
208
 
209
+ const fontWeight : number = (font_weight) ? font_weight : 400;
210
+
209
211
  const innerTextStyle = {
210
212
  color,
211
213
  lineHeight: lH,
212
214
  wordSpacing: wS,
213
215
  letterSpacing: lS,
214
216
  fontSize: fS,
217
+ fontWeight,
215
218
  whiteSpace: whiteSpace as any,
216
219
  fontFamily: (!fontError) ? font : 'Arial, helvetica, sans-serif'
217
220
  };
@@ -19,6 +19,7 @@ export interface ITextLayer {
19
19
  color : string;
20
20
  background_color : string;
21
21
  font_size : number;
22
+ font_weight : number;
22
23
  font_type : string;
23
24
  font : string;
24
25
  custom_font_id? : string;
@@ -160,6 +161,7 @@ const NEW_TEXT_LAYER : ITextLayer = {
160
161
  background_color : 'transparent',
161
162
  font_size : 24,
162
163
  font_type : 'standard',
164
+ font_weight: 400,
163
165
  font : DEFAULT_FONT,
164
166
  custom_font_id: null,
165
167
  custom_font_url: null,