@stack-spot/citric-react 0.3.0 → 0.3.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/citric-react",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "author": "StackSpot",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -189,7 +189,7 @@ export function RichSelect<T>({
189
189
  }}
190
190
  aria-hidden
191
191
  >
192
- {renderHeader?.(value) ?? renderOption?.(value) ?? renderLabel(value)}
192
+ {(renderHeader?.(value) ?? renderOption?.(value) ?? renderLabel(value)) || <span></span>}
193
193
  {loading && <ProgressCircular size="xs" className="loader" />}
194
194
  </header>
195
195
  <div className="selection-panel" aria-hidden>
@@ -63,6 +63,7 @@ const appearanceToTag: Record<TextAppearance, SupportedTags> = {
63
63
  export function Text<T extends SupportedTags>({ tag, appearance, color, showMargins, style, className, children, ...props }: TextProps<T>) {
64
64
  const renderedTag = tag || appearanceToTag[appearance || 'body2']
65
65
  const renderedAppearance = appearance || (tag ? tagToAppearance[tag] : undefined)
66
+ if (!appearance && !showMargins) style = { ...style, margin: 0 }
66
67
  return createElement(
67
68
  renderedTag,
68
69
  {