Closed allangaldinosilva closed 5 months ago
This PR enhances the utility method to support additional properties. For instance, the lineClamp property does have additional properties but those can't be passed to the lineClamp(value) utility method.
lineClamp
lineClamp(value)
Before
/** Sets `WebkitLineClamp: value`. */ lineClamp(value: Properties["WebkitLineClamp"]) { return this.add("WebkitLineClamp", value); }
After
/** Sets `WebkitLineClamp: value`. */ lineClamp(value: Properties["WebkitLineClamp"]) { return this.add("WebkitLineClamp", value) // default def .add("overflow", "hidden").add("display", "-webkit-box").add("WebkitBoxOrient","vertical",).add("textOverflow", "ellipsis"); // additional defs }
With these changes, lineClamp(value) will have the ability to define additional properties combining to the value param.
value
Also, added a few tests for packages/truss/src/methods.test.ts
packages/truss/src/methods.test.ts
cc @bdow since he's going to use it.
:tada: This PR is included in version 1.134.0 :tada:
The release is available on:
v1.134.0
Your semantic-release bot :package::rocket:
This PR enhances the utility method to support additional properties. For instance, the
lineClamp
property does have additional properties but those can't be passed to thelineClamp(value)
utility method.Before
After
With these changes,
lineClamp(value)
will have the ability to define additional properties combining to thevalue
param.Also, added a few tests for
packages/truss/src/methods.test.ts
cc @bdow since he's going to use it.