Skip to content

Commit

Permalink
fix(hotspot-text-style-tab): removed defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
marcJV committed Nov 30, 2020
1 parent 88d27b3 commit e2db12a
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ const propTypes = {
light: PropTypes.bool,
/** set of internationalized labels */
i18n: PropTypes.shape({
boldLabel: PropTypes.string,
italicLabel: PropTypes.string,
underlineLabel: PropTypes.string,
fontLabel: PropTypes.string,
fontSize: PropTypes.string,
fontSizeInvalid: PropTypes.string,
backgroundLabel: PropTypes.string,
fillOpacityLabel: PropTypes.string,
fillOpacityInvalid: PropTypes.string,
borderLabel: PropTypes.string,
borderWidth: PropTypes.string,
borderWidthInvalid: PropTypes.string,
boldLabelText: PropTypes.string,
italicLabelText: PropTypes.string,
underlineLabelText: PropTypes.string,
fontLabelText: PropTypes.string,
fontSizeText: PropTypes.string,
fontSizeInvalidText: PropTypes.string,
backgroundLabelText: PropTypes.string,
fillOpacityLabelText: PropTypes.string,
fillOpacityInvalidText: PropTypes.string,
borderLabelText: PropTypes.string,
borderWidthText: PropTypes.string,
borderWidthInvalidText: PropTypes.string,
}),
/** Callback for when any of the form element's value changes */
onChange: PropTypes.func.isRequired,
Expand Down Expand Up @@ -103,12 +103,12 @@ const defaultProps = {
fontColors: undefined,
backgroundColors: undefined,
borderColors: undefined,
minFontSize: 1,
maxFontSize: 50,
minOpacity: 0,
maxOpacity: 100,
minBorderWidth: 0,
maxBorderWidth: 15,
minFontSize: undefined,
maxFontSize: undefined,
minOpacity: undefined,
maxOpacity: undefined,
minBorderWidth: undefined,
maxBorderWidth: undefined,
};

/* this component is only used internally where props are defined and set. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ export const Default = () => {

return (
<HotspotTextStyleTab
minFontSize={1}
maxFontSize={50}
minOpacity={0}
maxOpacity={100}
minBorderWidth={0}
maxBorderWidth={50}
fontColors={colors}
backgroundColors={colors}
borderColors={colors}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ exports[`Storybook Snapshot tests and console checks Storyshots Watson IoT Exper
aria-label={null}
disabled={false}
id="iot--hotspot-text-style-tab__border"
max={15}
max={50}
min={0}
onChange={[Function]}
pattern="[0-9]*"
Expand Down
36 changes: 18 additions & 18 deletions src/utils/__tests__/__snapshots__/publicAPI.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6213,12 +6213,12 @@ Map {
"underlineLabelText": "Text Underline",
},
"light": true,
"maxBorderWidth": 15,
"maxFontSize": 50,
"maxOpacity": 100,
"minBorderWidth": 0,
"minFontSize": 1,
"minOpacity": 0,
"maxBorderWidth": undefined,
"maxFontSize": undefined,
"maxOpacity": undefined,
"minBorderWidth": undefined,
"minFontSize": undefined,
"minOpacity": undefined,
},
"propTypes": Object {
"backgroundColors": Object {
Expand Down Expand Up @@ -6315,40 +6315,40 @@ Map {
"i18n": Object {
"args": Array [
Object {
"backgroundLabel": Object {
"backgroundLabelText": Object {
"type": "string",
},
"boldLabel": Object {
"boldLabelText": Object {
"type": "string",
},
"borderLabel": Object {
"borderLabelText": Object {
"type": "string",
},
"borderWidth": Object {
"borderWidthInvalidText": Object {
"type": "string",
},
"borderWidthInvalid": Object {
"borderWidthText": Object {
"type": "string",
},
"fillOpacityInvalid": Object {
"fillOpacityInvalidText": Object {
"type": "string",
},
"fillOpacityLabel": Object {
"fillOpacityLabelText": Object {
"type": "string",
},
"fontLabel": Object {
"fontLabelText": Object {
"type": "string",
},
"fontSize": Object {
"fontSizeInvalidText": Object {
"type": "string",
},
"fontSizeInvalid": Object {
"fontSizeText": Object {
"type": "string",
},
"italicLabel": Object {
"italicLabelText": Object {
"type": "string",
},
"underlineLabel": Object {
"underlineLabelText": Object {
"type": "string",
},
},
Expand Down

0 comments on commit e2db12a

Please sign in to comment.